I have tested build applications for corporate-owned, single-use (COSU) code from google for single app use case where there will be one app locked on the screen. It works well, but the app need to be device owner to use lockTask. For testing purpose i have use adb shell command which can not be used for production, how do i manage provisioning process for production?
2 Answers
You no longer need to implement a Device Policy Controller to manage Android devices, Google has recently released the Android Management API which allows you to set up a COSU device with just a few Cloud API calls. With the Android Management API you can set up devices using a QR code, with NFC, or entering a manual token, as you prefer.

- 2,191
- 1
- 12
- 14
-
It looks like this only supports Android 6+, is there any way to do this for Android 5.1? – wanderer0810 Nov 05 '17 at 18:53
-
QR code setup requires Android 6+, but you can use NFC to set up a device running Android 5.1. – Fred Nov 05 '17 at 19:11
-
Don't you have to enrol in the EMM community to use this? and doesn't that take months? – Jules Oct 03 '18 at 11:16
-
You can use the Android Management API without enrolling in the EMM Community. If you need to set up more than active 10 devices you will need to enroll in the EMM Community, the process is a bit painful at the moment and takes a couple of weeks. – Fred Oct 05 '18 at 09:58
For once you can use a NFC provisioning. You will need another phone with "programmer app" that will beam the Bundle of data including wifi SSID, PASSWORD and APK PATH for the "production device" to download install and set as device owner. There are another ways of doing that (apart from the one you used with adb command, but that only works on rooted devices). Please get back to me if you need any more info.
Check this out: http://florent-dupont.blogspot.com/2015/02/10-things-to-know-about-device-owner.html
and this : https://www.youtube.com/watch?v=GGDpShew3aA&t=278s
For testing purposes I've actually used the programmer's app from the second link I posted.

- 677
- 8
- 21