I don't want to do advertisement but sample app for behavior of my application is ESET antivirus.
One requested feature of my application is that for uninstall is needed password. I add my app to device admin list and it is not possible to uninstall it now. But you can Deactive app as admin device. Whan you go to Settings > Location & security > Select device administrators and you try to deactive ESET Security it starts starts the activity (I guess from DeviceAdminReceiver.onDisableRequested()) which is waiting for password and your mobile is locked. Home button, back button and even SwitchOff button doesn't react=>
1.How it is possible to disable Home,Back,SwitchOff and Camera button as ESET do.
I took out battery from my phone and after it ESET was still device admin - it mean they achieve some way that DeviceAdminReceiver was waiting for result of MyGetPasswordActivity. Because after Deactive button press you can call StartActivity(MyGetPasswordActivity) at DeviceAdminReceiver.onDisableRequested. But it is needed to wait for password and not to execute super.onDisableRequested() - app will remove app from device admin list.
2.How is possible to wait with execution of super.onDisableRequested() and wait for result of my Activity.
Thank you for ideas.
.
forum.xda-developers.com
No comments:
Post a Comment