Hello,
I am referring to that library : https://www.b4x.com/android/forum/threads/device-administrator-library.19208/
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
I am referring to that library : https://www.b4x.com/android/forum/threads/device-administrator-library.19208/
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
B4X:
java.lang.NullPointerException
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
Attachments
Last edited: