Introduction - If you have any usage issues, please Google them yourself
The Android lock screen source code, Lock Screen Activity example. Understand process: first of all, we want to obtain the Android equipment management agency, LockScreen inherits from DeviceAdminReceiver, get the current device manager has no activation, without activation of words, to prompt the user to activate (for the first time when you run the program, if already activated ), executes immediately lock screen, killMyself, after the lock screen immediate kill off our Activity, avoid the waste of resources.