I have seen some applications like applocker in the playstore and I wonder how they prevent disable device admin privilege using a password prompt. I had some work around for the same but disappointed since the method onDisableRequested in my class which extends the DeviceAdminReceiver does not work for me instantly(It can't start an activity instantly or it has some delay of 3-7 seconds to start an activity).
I'am really sure there should be some other way to do it correctly.
All I need is to show an activity that prompts for password immediately when the user presses on check box in device's device administrator window.
Sorry for my bad English:-(