I am trying to get an existing RhoMobile APK running on a TC52, Android 8.1. The App is running fine on TC51, Android 6. On the TC52, when i start the app I get a toast message
DS8178 Bluetooth Scanner is not connected, therefor BTPairing Utility will be started.
The problem is that - ignoring the BTPairing Utility App (i also tried to disable it) - i cant use the build in scanner in my rho mobile app. When I try to use it I see the following message in the log
"The decodeSound barcode property can only be set once the scanner has finished initialising"
Looking at the underlying code, it looks like that the scanner has not initialised, probably due to not be able to pair the bluetooth scanner. But there is now such scanner and there never will be. Anybody know how to disable this behaviour?
Edit 1: Here is my javascript code for enabling the scanner
Rho.Barcode.enable({ allDecoders: true }, this.onScan);
But, I think it happens before that javascript is accessed; the app is hosted on web server; even if i disable WIFI and starting the app, the toast is displayed. It seems like that RhoMobile is trying to setup all known scanners.
Edit 2: When I enumerate all scanners, i get those in this order
Scanners found: '[
"Camera Scanner",
"2D Barcode Imager",
"Bluetooth Scanner",
"RS6000 Bluetooth Scanner",
"DS3678 Bluetooth Scanner",
"LI3678 Bluetooth Scanner",
"DS2278 Bluetooth Scanner",
"DS8178 Bluetooth Scanner"]'
Default scanner: '2D Barcode Imager'
Default scanner is determined by
Rho.Barcode.getProperty("friendlyName");
Edit 3: Ok, as suggested in the comments, using the actual instance returned from the enumeration works; triggering scanner buttons works well.
What remains is the toast that asks to connect the DS8178 Bluetooth Scanner
; is there a way to disable scanners from config.xml?
This error:
DS8178 Bluetooth Scanner is not connected, therefor BTPairing Utility will be started.
Is not coming from RhoMobile, it is being generated from the low level scanning framework. I checked on a more up to date device and I'm glad to say they fixed the spelling error. It is caused when something (either EMDK or DataWedge) tries to enable the DS8178 scanner. The DS scanner support was only added in a recent version of the mobile computing scanner framework so that probably explains the difference in behaviour you are seeing between TC51 and TC52.
RhoMobile (on Zebra Android devices) wraps the EMDK and exposes each supported scanner as a separate Barcode object and you can see all of these in the array returned from enumerate. What is strange is that, per your second edit, the default scanner is '2D Barcode Imager'.
There are a few options / possibilities:
There is no way to disable any of the scanners via XML