You will need to expand DeviceAdminReceiver and
public class DeviceAdmin extends DeviceAdminReceiver { @Override public void onEnabled(Context context, Intent intent) { Log.i(this, "admin_receiver_status_enabled");
anywhere in your application:
DevicePolicyManager mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE); ComponentName mAdminName = new ComponentName(this, DeviceAdmin.class); if(mDPM != null &&mDPM.isAdminActive(mAdminName)) {
malimo
source share