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.