Android Question [SOLVED] Does Device Administrator Library need an Activity ?


Well-Known Member
Licensed User
Longtime User
I am referring to that library :

My need was to block an app uninstallation. I have seen that Administrators apps won't be uninstalled simply till they are (asking for the user to disable them, etc.).
My idea was to receive the "Disabled" action and after a small delay reenable the app as an Administrator.

It works when done from an activity but not from a service where I get an error (log attached because when I paste the lines they are down to top reversed). But the main error is

What I have tried is to move the Manager declaration in the service but it does not work (project attached).

Do you have any idea about ? Many thanks


  • log.txt
    2.5 KB · Views: 181
    8.5 KB · Views: 188
Last edited:


B4X founder
Staff member
Licensed User
Longtime User

The Enable method must be called from an activity.
Upvote 0