0

I'm designing a device-owner App for professional purposes, and even if there is few doc about this, Google tells everywhere* that a device-owner app can do almost whatever it wants on the device... But sadly all the examples are desperately referring to setup and verify passwords strenght...

What I want to do are things such as:

  • Force updating the App even if the automatic updates setting is turned off in the PlayStore options;
  • Enabling or disabling programmatically the GPS and Bluetooth.

Does fine grain control over the device could mean all of this ? and if yes, how to do such things, I can't find any example or method related to those actions...


*In videos from the developers channel, or for example an excerpt taken from this doc page:

A device owner is a specialized type of device administrator that has the additional ability to create and remove secondary users and to configure global settings on the device. Your device owner app can use the methods in the DevicePolicyManager class to take fine-grain control of the configuration, security, and apps on managed devices.


EDIT : it looks like a found some answers in the meantime thanks to this post from Florent Dupont. Still not getting sure how I can prevent the user to turn off auto-updates for the app, thus forcing the app to be updated whatever the PlaySettings are...

JBA
  • 2,889
  • 1
  • 21
  • 38

1 Answers1

0

When developing a Device Administrator application, you are restricted to the APIs in DevicePolicyManager. There are a couple of exceptions:

setGlobalSettings and setSecuriteSetting use enums in other classes.

setApplicationRestrictions uses settings that can be defined in applications themselves without the need to modify the DevicePolicyManager API.

To force app update is not supported to my knowledge unless you use setApplicationRestriction on e.g. Google Play app directly.

There is also the possibility to install an app programmatically, but in that case the user need to approve. I don't know if that method also works for updates.

Community
  • 1
  • 1
Marek Pola
  • 200
  • 1
  • 10