Disable Android Application Uninstallation using Device Administration

Android platform offers system-level device management capabilities through the Device Administration APIs. If an application package component is registered as system administrator, it can provide device administration features at the system level. An active system admin package can not be uninstalled until removed as system administrator. We will make benefits of this property to disable android application uninstallation by registering and activating system admin component.

 Sample Application


[su_button url=”https://github.com/androidsrc/DeviceAdminSample” target=”blank” style=”stroked” background=”#51d461" color=”#ffffff” size=”6" center=”yes” radius=”0" icon=”icon: arrow-circle-o-down”]Download Full Source Code[/su_b[/su_button]p> 

[su_ca[su_carousel source=”media: 244,245,247,246,248,249" link=”lightbox” width=”700" height=”400" title=”no” mousewheel=”no”]p> 

In AndroidManifest.xml,
1. We need to declare a receiver which will subclass DeviceAdminReceiver.
2. Permission attribute should be declared with value android.permission.BIND_DEVICE_ADMIN
3. meta-data tag defining device admin policies usage.
4. intent-filter for admin enable, admin disable and admin disable request.

You may also like...

2 Responses

  1. Menashe Ungar says:

    I am working on a sort of simplified MDM for my company, but the fact that a user can disable an administrator so simply makes all this stuff unusable. Is there a way for a device company owned to prevent this?

  2. mgodot says:

    555555,not work in android 6.0,

Leave a Reply

Your email address will not be published. Required fields are marked *