Callback when clicking on "Uninstall app" from Device administrator screen android (7.0)..?

471 views Asked by At

In marshmallo and bellow , i was able to see "Active" and "cancel" button in Device administrator screen and i can get the callbacks in onActivityResult() 0,-1 respectively.but in android nougat (7.0) one new field is added along with two buttons (i.e) "Uninstall app".while clicking on this ,app is getting terminated showing uninstall pop screen

so is there any way to catch the callback while clicking on "Uninstall app" button

**code for pushing deviceadmin activity**

    Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
    intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, mComponentName);
    intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
    startActivityForResult(intent, ADMIN_INTENT);

How we can solve this...?

Thanks in advance.

enter image description here

0

There are 0 answers