We have to create a kiosk mode android app.
The app is ready, we need only to set kiosk mode.
We want to set the "set-device-owner" programmatically but our tablet is not rooted.
We don't want use ADB because this can be hard to explain to our customer.
Is there another way to enable it?
You can use QR code provisioning to get device owner privilege.
After factory reset on the welcome screen, tap Welcome 6 times to enter QR code provisioning mode. Here you can scan your QR code that is generated using the following code to activate device owner.
{"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "in.test.mdm/in.test.mdm.AdminReceiver", "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM": "AVMYPJsNa1nCkf0jdWPEY7x_wnfYaIh1ouWuq10rYZY", "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://drive.google.com/uc?id=1XqplR-QKO_iUqdm6RAjAPeAAGwoI6uFj&export=download", "android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED":true,"android.app.extra.PROVISIONING_SKIP_ENCRYPTION":true,"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE":{"test":"test" } }
You can generate a qr code by pasting the above text in any qr code generator site for example : https://www.the-qrcode-generator.com/
Related
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 a bug in the RhoMobile framework and for some reason the DS8178 scanner is being enabled. I checked https://github.com/rhomobile/rhodes/tree/master/lib/commonAPI/barcode/ext/platform/android/src/com/rho/barcode and cannot see any such bug. Rho is open source but supported by Tau-Technologies if you wanted to explore that route.
Something else on your device is enabling the DS8178 scanner, e.g. a DataWedge profile or other app using the EMDK. You could disable DataWedge (from the DataWedge app settings) and reboot your device to test this.
There is an issue with the TC52. I would say this is the least likely as I have never heard of a similar issue
There is no way to disable any of the scanners via XML
I am working on an application that has a requirement to lock the RAT on devices. I just want to lock only two modes i.e. "LTE Only" or "WCDMA Only".
We can do this without using an app from phone dial app by running ##4636## and choosing Phone Information and the "LTE Only" or "WCDMA Only".
I have also tried QXDM to set these values on NV Item 10 but it doesn't persist on reboot. So if some one have good knowledge of QXDM and share that knowledge then it would be really helpful.
My final goal is to do this from Android application that has root access.
Question:
How to communicate with an integrated Honeywell n4313 barcode scanner without the ability to use the laser beam?
Current Status:
I have an Chainway c6000 mobile device with integrated Honeywell n4313 barcode scanner. I somehow managed to scan a barcode which switched of the laser beam. Hence, i cannot scan barcodes using the laser beam. I am trying to find a way to switch it back on.
I am able to build android apps but i cannot talk to the barcode scanner. I have searched, including the Honeywellaid support and software platform. There is no documentation that explains this issue.
Any direction or help would be great.
The way to return to the factory condition is written in C6000 FAQs of Chainway.
How to restore factory data of C6000?
a. Switch off the device.
b. Press and hold power button and button on the left to restart device.
c. Select “wipe data/factory reset” and press power button to execute.
If it does not fix it, you will need to send it to the company for repair.
Repair and Service
How to send devices for R&M by delivery?
a. Apply RMA list and non-commercial invoice from service center.
b. Please declare delivery as normal USB barcode reader with the piece of $20 per unit and do not send back the accessories especially batteries if they are working fine. Please send back by TNT if it is possible since this would be easier for custom clearance. Fill and send RMA request sheet and non-commercial invoice. And send the faulty devices no more than 3 pieces in one packet.
If it returns to the factory condition, can the scanner be used with KeyboardEmulator or AppCenter?
APPcenter and KeyboardEmulator
How to scan barcode in Keyboardemulator?
a. Switch on the device.
b. Click Keyboardemulator to enter page “Function”.
c. Setup KeyCode value to 139.
d. Select option “Barcode2D(S)” with check mark.
e. Select “ON” to Enable Scanner.
f. Select “Test” to enter the page and scan barcode.
How to scan barcodes in Appcenter?
a. Switch on the device.
b. Click Appcenter to enter its page.
c. Click icon “2D(S)”.
d. Click button “Scan” or pull the trigger on pistol to scan barcode.
If you want to directly control the scanner from the application, not keyboard emulation or AppCenter, please contact Chainway.
Contact Us
Probably, you need to register as a partner.
Our Partners
I am making an Android app to receive data from Arduino(NRF24L01).
Arduino(NRF24L01) can send data only with Bluetooth device name.
So I get the value by putting the analog value in the BLEname.
Like this YouTube video.
https://youtu.be/F9yMTdcd33w?t=240
However, the Android application does not come back with the information of a device once it is already connected.
ex)
BLE Device name : "A=i" //(i=analog.value;)
first BLE SCAN -> find -> BLE Device name : "A=12"
I change i,(i=14;)
Second BLE SCAN -> find -> BLE Device name : "A=12"
why????????? i want "A=14"!!
Therefore, I would like to create an application that will continue to scan and retrieve device name information.
Is there any example I can refer to?
P.S I am sorry that I have not translated the translator and the context is not smooth.
You can refer this example for BLE scanning and connection or you can use customize as you want.
BleConnect
We are developing a locked down "kiosk-style" Android app on a stock Samsung tablet, which is mounted in customer vehicles. We would like to be able to allow customers to edit their wifi settings, without giving them access to the rest of the Settings app (e.g. Launcher, accounts, etc)
We have been able to launch the Wifi Settings activity, but it allows the user to go into other areas.
I'm not sure whether it's possible to create a custom interface for connecting to wifi, but even if it were possible, this seems fragile and a lot of work for something quite simple.
Is there any way to solve this well?
I would create a device policy controller app that is provisioned on the device as a device owner using Android Enterprise (Android for Work) APIs.
https://developers.google.com/android/work/dpc/build-dpc
As a device owner, you can set your app in lock task mode which is generally used for kiosks.
https://developer.android.com/work/cosu.html
Then, you can set user restrictions:
addUserRestriction api
user restrictions list
The user restrictions don't cover everything in the settings app, but the coverage is pretty good.
Then I would provision it using NFC or QR code reader from the Google Setup Wizard welcome screen.
https://github.com/googlesamples/android-NfcProvisioning
You might want to also look at existing open source EMM/MDM implementations that already exist such as WSO2.
Other references:
How to enable task locking in Android 5.0 production devices
How to make sure there is only one app
I was also working on Kiosk Type applications and we have to give options for Change wifi and Display Settings So we have used these commands on Button click for Wifi And Display
Settings
btnWifiSetting.setOnClickListener {
startActivityForResult( Intent(android.provider.Settings.ACTION_WIFI_SETTINGS), 0);
}
And For Display Setting
btnDisplay.setOnClickListener {
startActivityForResult(Intent(android.provider.Settings.ACTION_DISPLAY_SETTINGS),0)
}
And you can also check the full list of Available Commands here
https://ourcodeworld.com/articles/read/318/how-to-open-android-settings-programmatically-with-java
try LineAgeOS
https://lineageos.org/
Your requirement needs to access OS System level, this way you have access and customize the WIFI settings before releasing the phone itself
can you try this way.
WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager.isWifiEnabled()) {
wifiManager.setWifiEnabled(false);
Tools_WiFi.setImageResource(R.drawable.tool_wifi_off);
} else {
wifiManager.setWifiEnabled(true);
Tools_WiFi.setImageResource(R.drawable.tool_wifi_on);
}
You can try this:
startActivityForResult(new Intent(Settings.ACTION_WIFI_SETTINGS), 0);
Hope it helps you.