I'm using in my app Device Admin API but it requires actions from user to enable it - I was wondering that is it somehow install app and automatically enable admin on it without asking user?
Does anyone tried to do something like this
I'm using in my app Device Admin API but it requires actions from user to enable it - I was wondering that is it somehow install app and automatically enable admin on it without asking user?
Does anyone tried to do something like this
Enable Device Admin without asking user
Not a good idea. If that would allowed by android then anyone can play with users and user's data. Android not allowed , not allowing and will not allow this thing in future. You better stop wondering ;)
This isn't possible, the device admin provides certain rights to the device for an app, that a standard app does not have. It would be a huge security risk if the user installed an app and it automatically set itself as a device admin without the users consent or knowledge.
There is no way to enable or disable Device Admin without asking the user for security purposes.
OK after long time I have to say that it's impossible to do it without OS moddification. Even I have tried to use Android hidden API by reflection but then looks that you need some system permission.
Use dpm set-active-admin
, if you have root or system/signature privileges.