androiddatawedge

How to use the barcode captured with a scanner using DataWedge?


How does DataWedge works? I read that you have to create a profile from the app and associate it with your app, but after that, in my app, how can I use the barcode I have just scanned? For like displaying it in a textview or send it to a server. I can't find anything on the documentation.

Thanks in advance.


Solution

  • The profile defines how the barcode will be delivered to your application.

    A typical choice is to use Intents, for example a broadcast intent with a specific action. Your application can then set a BroadcastReceiver up. The read barcode will be available in the intent as the com.symbol.datawedge.data_string extra.

    An tutorial using broadcasted intents.

    The content of the received intent is detailed here