Android Question Zebra(former Symbol Motorola) mobile device

Discussion in 'Android Questions' started by Georg Machacek, Jul 12, 2019.

  1. Georg Machacek

    Georg Machacek New Member Licensed User

    Does anybody have any expirience with TC25 barcode scanning using intent?

    Regards and thanks in advance
    Georg
     
  2. Gabino A. de la Gala

    Gabino A. de la Gala Active Member Licensed User

  3. Peter Simpson

    Peter Simpson Expert Licensed User

    Do you have a copy of the Android SDK, it's relatively easy to give you the answer if you can supply the SDK.
     
  4. DonManfred

    DonManfred Expert Licensed User

  5. Peter Simpson

    Peter Simpson Expert Licensed User


    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.
    Code:
    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: Jul 13, 2019
    Erel, f0raster0 and Johan Hormaza like this.
  6. DonManfred

    DonManfred Expert Licensed User

    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 ;-)

     

    Attached Files:

    Erel likes this.
  7. Georg Machacek

    Georg Machacek New Member Licensed User

    Thank you all, DonManfred's solution brought me to the right way to solve my problem.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice