Hi all,
I am developing a lock screen application, which is an alternative for the factory lock. There are some similar applications on the Play Store, so it doesn’t seem to be impossible to solve my issue. I successfully created a view with layoutinflater that covers the full screen, but it also covers the phone calls, alarms, etc, what is embarrassing. Currently I do this with the windowManager like this: View.*inflate*(*this*, R.layout.*main*, main_frame); WindowManager.LayoutParams localLayoutParams = *new * WindowManager.LayoutParams( WindowManager.LayoutParams.*TYPE_SYSTEM_ERROR*, WindowManager.LayoutParams.*FLAG_NOT_FOCUSABLE *| WindowManager.LayoutParams.*FLAG_NOT_TOUCH_MODAL *| WindowManager.LayoutParams.*FLAG_LAYOUT_IN_SCREEN*, PixelFormat.*TRANSPARENT*); *final *WindowManager winManager = (WindowManager) getSystemService( *WINDOW_SERVICE*); winManager.addView(main_frame, localLayoutParams); As you can see, I use TYPE_SYSTEM_ERROR in the code, which works perfectly excepting this issue. The other applications might use TYPE_KEYGUARD or TYPE_KEYGUARD_DIALOG, but it throws a security exception for me. I’m unable to set a permission that enables me to use this feature. What should I do to enable it, or how can I set the z-index of the view manually? Furthermore, on some device I can disable the factory lock manually, which is great, but not every device supports the “no lock screen” mode, just the “slide” option, which shows me the factory lock screen, so I have to disable it programmatically. I tried it using the KeyguardManager and was able to disable the factory locker. When I unlocked the phone with my application and pressed the app overview button then the home button, the screen turned black and the device became unusable. This is a known issue on the bug list, so I know this is a system problem. Are there any other solution that enables me or the user to remove the factory lock screen on any device? Looking forward for your answers, Jonathan Pethő -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/b89069ae-1343-4259-9dd3-d65b8a5e494a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.