Issue
I am trying to see if its possible to simulate a barcode being scanned from the zebra crossing scanner and broadcasting that scan to one of our applications that has the scanner repo built into it.
I have been trying to use adb broadcasts like the folowing:
adb shell am broadcast -a com.package.app.ACTION -es SCAN_RESULT "1021101" com.package.app/.com.package.app.droid.activities.MainActivity
With plenty of different variances with no success.
Zebra Crossing Github: https://github.com/zxing/zxing
How the application handles scans
String symbology = intent.getStringExtra("SCAN_RESULT_FORMAT");
String barcode = intent.getStringExtra("SCAN_RESULT");
Solution
You need to use either "-e" or "--es" to add a string extra. You've used "-es".
Documentation is here: https://developer.android.com/studio/command-line/adb#IntentSpec
Answered By - David Wasser
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.