Android Question BroadcastReceiver Lib use in Starter service

ThePlankton

Member
Licensed User
I have a Honeywell CT60 and I'm using the barcode scanner via intents. I'm using the BroadcastReceiver library and I wrapped the logic in a class. The class is instantiated in the Starter service. We have a mix of Android 7 and 8 CT60's. I believe only on the Android 8 versions the BroadcastReceiver stop receiving the broadcasts after the first time it receives one.

Is there anything wrong with the way I'm doing this? Is anything wrong with creating the instance in the Starter service?
 

Peter Simpson

Expert
Licensed User
Longtime User
Hello @ThePlankton,
Firstly you should use the starter service to start another service that has the BroadcastReceiver code in it, you should not really place that code in a class, I wouldn't anyway

I currently specialise in distributing these little beauties to businesses that are in need of 1D or 2D barcode scanners, you should try placing your BroadcastReceiver code in a service (not the starter service), you shouldn't have any issues after that, and yes, I do have these other laser scanners running Android 8 also working perfectly fine.

Android-Barcode-Scanner-Handheld-PDA.jpg


Have you read this post???



Enjoy...
 
Last edited:
Upvote 0
Top