Require Pass-code to Disable Android Device Administrator

后端 未结 1 914
一整个雨季
一整个雨季 2021-01-07 03:41

I was thinking of a security app which will have device administrator privileges. I wanted to see if it was possible to require a pass-code when the user tries to uncheck th

相关标签:
1条回答
  • 2021-01-07 04:20

    Start the pass-code activity in onDisableRequested() method (an override method of DeviceAdminReceiver)

    In Android 2.3 As soon as deactivate button is clicked your activity will open.

    From Android 4.x The activity opens after around 5-10 secs when deactivate button is clicked. So you can lock the device from onDisabled() method instead onDisableRequested().

    0 讨论(0)
提交回复
热议问题