Is it possible to use a built-in scanner (in TC56 model) on the home screen or even in lock mode and pass data to my app?
Basically, all I want to do is this sequence:
on the home screen, scanner buttons are pressed->barcode getting scanned->specific app receives scan result
Are there any API methods I can use for this?
Use a built-in scanner (in TC56 model) on the home screen or even in lock mode// Expert user has replied. |
4 Replies
Hi,
One option would be to create a foreground service with a broadcast receiver which listens for scan intents broadcast from DataWedge - more info here: https://techdocs.zebra.com/datawedge/11-2/guide/about/
Thanks for the reply. I've tried this option with foreground service, but even when the service is running and app is in the background, scanner buttons seems disabled and don't actually turn on the scanner
There is a default profile in DataWedge called "Launcher" which is what is active when the device is on the launcher screen - you may have to modify this profile to fit your needs, specifically enabling Barcode Input & Intent Output and configuring Intent Output to send the data to your broadcast receiver.
Hi,
In addition to James' comment, I wrote two articles about scanning with DataWedge in the background which might help:
https://developer.zebra.com/blog/datawedge-background-scanning-zebra-an…
https://developer.zebra.com/blog/scan-datawedge-using-explicit-broadcas…