daneejela
daneejela

Reputation: 14213

Can Android device have more then one device owner/admins?

I need to develop a launcher app that runs in a kiosk mode. In order to do so, I understand that my app needs to be a device owner/device admin. I have access to devices and I can make my app a device owner (through ADB command), but I am afraid I would break the current MDM solution (if some MDM app or service loses its admin owner permissions)

So, my question is - can a device have multiple owners/admins?

If not, can an app start kiosk mode without being a device owner?

Upvotes: 0

Views: 1493

Answers (1)

vmayorow
vmayorow

Reputation: 715

The Android device cannot have more than one device owner. If you try to assign a device owner when the device owner is already set, you will get an IllegalStateException:

java.lang.IllegalStateException: Trying to set the device owner, but device owner is already set.

Therefore, if you are able to set your launcher as a device owner, this means, there was no device owner previously, and you won't break anything.

Without device owner rights, you cannot start kiosk mode, i.e., call Activity.startLockTask().

Upvotes: 1

Related Questions