SEND_RESULT doesn't work and my BR couldn't receive anything from device

// Expert user has replied.
D Dan KR 1 year 6 months ago
80 4 0

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)

Please Register or Login to post a reply

4 Replies

S Sean Kennedy

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?

S Sean Kennedy

Also what do you get with this:

https://techdocs.zebra.com/datawedge/13-0/guide/api/resultinfo/

D Dan KR

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)

S Sean Kennedy

Two things:  ( NOTE I am using Android Studio sample code from the TechDoc )

Do just this first:

Intent i = new Intent();
i.setAction("com.symbol.datawedge.api.ACTION");
i.putExtra("com.symbol.datawedge.api.ENABLE_DATAWEDGE", false);
this.sendBroadcast(i);

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{} )

// request and identify the result code
    i.putExtra("SEND_RESULT","true");
    i.putExtra("COMMAND_IDENTIFIER","123456789");
    this.sendBroadcast(i);

 

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".

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