How to Make an activity floating above the screen lock interface, return to enter the unlock interface.
For example, on the screen lock page, you do not need to unlock a call before you can answer the call. This can bring speed.
If you want to implement iphone 4S above the screen lock interface on android, you can also do it in this way.
You only need to add the following flag to the onResume function of the Camera activity.
Import android. view. Window;
Import android. view. WindowManager;
Final Window win = activity. getWindow ();
Final WindowManager. LayoutParams params = win. getAttributes ();
Params. flags | = WindowManager. LayoutParams. FLAG_SHOW_WHEN_LOCKED;
/** Window flag: special flag to let windows be shown when the screen
* Is locked. This will let application windows take precedence over
* Key guard or any other lock screens. Can be used
* {@ Link # FLAG_KEEP_SCREEN_ON} to turn screen on and display windows
* Directly before showing the key guard window. Can be used
* {@ Link # FLAG_DISMISS_KEYGUARD} to automatically fully dismisss
* Non-secure keyguards. This flag only applies to the top-most
* Full-screen window.
*/
Public static final int FLAG_SHOW_WHEN_LOCKED = 0x00080000