SEND_RESULT doesn't work and my BR couldn't receive anything from device
I used this chunk of code to enable datawedge and was hoping to receive the result in my broadcast receiver, however my broadcast receiver didn't receive anything. Could you let me know why it doesn't work?
val intent = Intent().apply {
action ="com.symbol.datawedge.api.ACTION"
putExtra("com.symbol.datawedge.api.ENABLE_DATAWEDGE", true)
putExtra("SEND_RESULT","LAST_RESULT")
putExtra("COMMAND_IDENTIFIER","SET_CONFIG")
}
context.applicationContext.sendBroadcast(intent)
4 Replies
Hi Dan.
I see that you also filed a Help Desk ticket about this topic.
I think this TechDoc may also contribute to this topic:
https://techdocs.zebra.com/datawedge/13-0/guide/api/enabledatawedge/
Are you sure that you want to DISABLE Datawedge for all users/app of the device?
Or just disable the Scanning for a specific function within your application?
Also what do you get with this:
https://techdocs.zebra.com/datawedge/13-0/guide/api/resultinfo/
We wanted to enable it not disable it.
I followed https://techdocs.zebra.com/datawedge/13-0/guide/api/resultinfo/, but Broadcast receiver received nothing after we called:
val intent = Intent().apply {
action ="com.symbol.datawedge.api.ACTION"
putExtra("com.symbol.datawedge.api.ENABLE_DATAWEDGE", true)
putExtra("SEND_RESULT","LAST_RESULT")
putExtra("COMMAND_IDENTIFIER","SET_CONFIG")
}
context.applicationContext.sendBroadcast(intent)
Two things: ( NOTE I am using Android Studio sample code from the TechDoc )
Do just this first:
Then the extra next: ( Please Read the TechDoc I listed for you - it seems you are layering in too many things in your intent.apply{} )
Try the following Manually before you run your test:
Goto the Datawedge app.
Once in the app - goto the 3-dot menu and Settings.
Tap the "Datawedge enabled" munu line to "uncheck" the menu.
( NOTE: This is disabling Datawedge - which is what your code above is attempting to enable )
Click back once. Click Home button and then choose Recent apps menu and right-swipe Datawedge to fully close the UI.
Then test: and see if you get the confirm that Datawedge is started. ( Then you can lso go back into Datawedge and check the menu that you had "disabled".