Hi,
while I have my application running, there is a use-case where the application should be launched by another application while the keyguard is still on.
With other native applications, this works well, by using the following code in onCreate()
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
I created a launcher activity that extends from CoronaActivity and sets those flags in the onCreate() method.
But with Corona Enterprise, it seems that there is an issue with the OpenGL. The Lua part launches fine, up until the part where the OpenGL loop needs to be entered. All that is shown on screen is an empty activity.
When the key guard is already disposed, everything works fine. But when turning off and turning back on the screen, the window tries to continue but again the screen remains dark.
For me it seems that this may be related to this StackOverview article, i.e. to the Z-order of the OpenGL surface control in Android.
Any hint on how I could get this working? It is really important to my application, that as long as the user launched it before keyguard turns on, or if launched by another service in the background, that the application is shown in front of the keyguard. This is part of some sort of “kiosk-mode”, where the owner of the tablets doesn’t want the user of the application to be able to access other settings and applications of the device.