Decode Sample API
Settings Activity
The class com.datalogic.examples.decodesampleapi.SettingsActivity
handles the application settings following Android guidelines as explained in Settings API Guide. The settings are defined in xml files in the folder res/xml/
.
Scanner Service
The class com.datalogic.examples.decodesampleapi.ScannerService
implements an Android Service which is able to read barcodes when the application is not in foreground.
To use barcode listeners in a service, just register them as in any other Activity, the only difference is the entry point, which in the case of services is onStartCommand
:
Android services must be declared in AndroidManifest.xml
: