My Device is MC36.How I can get data By Scan Config of Intent output. I tried to get intent on onNewIntent(Intent intent) ,but onNewIntent() never called. The app of SCANDEMO in device can get data by Scan config of intent output.
ZEBRA MC36 data capture |
3 Replies
onNewIntent is only called if your application is set to have launchMode 'singleTop', see Activity | Android Developers .
I suspect you just want to call getIntent() in your application's onCreate method if the scan config is set to output intents via startActivity.
I set activity launchMode ‘singleTop’ or 'singleTask' but ThirdActivity's onNewIntent() method still can not be called. And I am not found setting of output intents in scan config.
Prefs.xml
1 0 0 0 com.syh.app.zebrascantest.ACTION.SCAN 14 10 55 12 55 0 4 1 55 0 com.syh.category.DEFAULT 0 55 4 0 1 10 UTF-8 0 0 1 6 55 55 0 0 0 content://media/internal/audio/media/97 0 10 0 0 0 55 0 0 0 0 0 55 com.symbol.scanconfig.ScanDemoActivity,com.symbol.scanconfig;*,com.android.quicksearchbox;*,com.android.browser;*,com.android.email;*,com.android.mms;com.syh.app.zebrascantest.ThirdActivity,com.syh.app.zebrascantest; 5000 0 2 0 75 0
Please see page 1-14 of the MC36 integrator guide: https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/mobile-com… . It looks like Intent Output is supported however HOW those intents are sent to your application is not specified. I suspect they are being sent as broadcast intents rather than intents to start your activity which would be why you do not see them in onNewIntent(). Unfortunately I do not have a device to check.