Android Question Zebra(former Symbol Motorola) mobile device

Peter Simpson

Expert
Licensed User
Longtime User
Does anybody have any expirience with TC25 barcode scanning using intent?

Regards and thanks in advance
Georg


Maybe something like this:
Place this code in a service module, I wasn't too sure about the extras, so hopefully one will work for you, but I doubt it.
B4X:
Sub Process_Globals
    Dim BRTC25 As BroadCastReceiver
End Sub

Sub Service_Create
    BRTC25.Initialize("BRZebraScan")
End Sub

Sub Service_Start (StartingIntent As Intent)
    BRTC25.SetPriority(2147483647)
    BRTC25.registerReceiver("com.symbol.emdk.datawedge.api.ACTION_SOFTSCANTRIGGER")
End Sub

'Hopefully something will appear in your logs, good luck.
Sub BRZebraScan_OnReceive (Action As String, Extra As Object)
    Dim IntGetBCData As Intent = Extra
    Log(IntGetBCData.GetExtra("com.symbol.emdk.datawedge.data_string"))
    Log(BytesToString(IntGetBCData.GetExtra("com.symbol.emdk.datawedge.decode_data"), 0, IntGetBCData.GetExtra("length"), "UTF-8"))
End Sub


Enjoy...
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Does anybody have any expirience with TC25 barcode scanning using intent?
1. You need to add your app using the Datawedge app to receive the Intents.
2. You need to configure the Datawedge to send Broadcast intents.

Basically you need to setup a Broadcast receiver for the Intents.

Note that i used a TC56 for my tests. But i guess they are similar. maybe ;-)

 

Attachments

  • ZebraIntentTest.zip
    10.9 KB · Views: 374
Upvote 0

igpf

Member
Licensed User
Longtime User

A thousand thanks. I just starting using the TC25, this code worked out of the box.

My only suggestion is to setup the DataWedge (app) in Android properly.
*- create a new profile
*- enable "intent output"
*- set intent action "com.symbol.datawedge.api.ACTION"
*- intent category, leave blank
*- intent delivery, set to Broadcast intent

thanks again. this was awesome! I have spent about 3 days trying to get this to work. The broadcast library was also key, so that's for that also.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…