Sending non-protected broadcast from system com.symbol.datawedge

E Efkan YILMAZ 3 years 6 months ago
3578 4 0

Hi, on Android 7 and 8 we get this crash:
2021-05-28 08:09:20.504 1891-3028/? E/ActivityManager: Sending non-protected broadcast com.mefer.ACTION from system 3061:com.symbol.datawedge/u0a15 pkg com.symbol.datawedge
java.lang.Throwable
at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19394)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19913)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20148)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3044)
at android.os.Binder.execTransact(Binder.java:697)
2021-05-28 08:09:20.506 1891-3028/? E/ActivityManager: Sending non-protected broadcast com.mefer.ACTION from system 3061:com.symbol.datawedge/u0a15 pkg com.symbol.datawedge
java.lang.Throwable
at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19394)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20006)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20148)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3044)
at android.os.Binder.execTransact(Binder.java:697)
Receiver is registered in activity:
fun AppCompatActivity.scannerChanges() =
Observable.create { emit ->
val action = "$packageName.ACTION"
val scanReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent?) {
if (intent != null && intent.action == action) emit.onNext(intent)
}
}
val filter = IntentFilter().apply {
addCategory(Intent.CATEGORY_DEFAULT)
addAction(action)
}
lifecycle.onResume { registerReceiver(scanReceiver, filter) }
lifecycle.onPause { try { unregisterReceiver(scanReceiver) } catch (e: Exception) { } }
emit.setCancellable {
try { unregisterReceiver(scanReceiver) } catch (e: Exception) { }
}
}
Any idea how fix this issue?
dependencies {
compileOnly 'com.symbol:emdk:9.1.1'
...
}

Please Register or Login to post a reply

4 Replies

P Pavol Franek

Darryn Campbell I do not understand your answer or how can your answer help me? There is no difference between your sample and my code snippet. I have IntentFilter...
And second question: Why we still see it in the log "Sending non-protected broadcast" when bug has been resolved in more recent builds? Should not negatively impact are you sure?

D Darryn Campbell

Hi, the "E/ActivityManager: Sending non-protected broadcast com.mefer.ACTION from system 3061:com.symbol.datawedge/u0a15 pkg" message was caused by a bug in DataWedge which has been resolved in more recent builds (I believe) but it should not negatively impact the performance or functionality of neither your app or DataWedge.
You will need to add a filter to your broadcast receiver so you can receive Intents from DataWedge.  Please see an example at https://techdocs.zebra.com/datawedge/8-2/guide/samples/basicintent1/.&n…; You also do not need to use the EMDK with DataWedge.

D Dave Hon

Bumping this since I'm getting the same issue.

We just purchased a WS50 and I can't get the intent to send at all. I've added the correct profile via the EMDK plugin in android studio. I've confirmed it is loading. I've also followed the instructions and duplicated the examples provided here an elsewhere.

M Martin Eberl

Any update? I'm facing the same problem..

CONTACT
Can’t find what you’re looking for?