You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if phone is looked and app is in background, if a service needs to show window, is not working.
I think you can add those flags
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
to be able to show window even when screen is looked
The text was updated successfully, but these errors were encountered:
I did R&D on that and to show dialog over lock screen need to add some permissions
Need to add below permissions in AndroidManifest:
"android.permission.FOREGROUND_SERVICE"
"android.permission.WAKE_LOCK"
"android.permission.SYSTEM_ALERT_WINDOW"
Now come to native part of the package there is one java file WindowSetup.Java and need to add following code for setFlag() method:
static void setFlag(String name) {
if (name.equalsIgnoreCase("flagNotFocusable") || name.equalsIgnoreCase("defaultFlag")) {
flag = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
}
if (name.equalsIgnoreCase("flagNotTouchable") || name.equalsIgnoreCase("clickThrough")) {
flag = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
}
if (name.equalsIgnoreCase("flagNotTouchModal") || name.equalsIgnoreCase("focusPointer")) {
flag = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
}
}
if phone is looked and app is in background, if a service needs to show window, is not working.
I think you can add those flags
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
to be able to show window even when screen is looked
The text was updated successfully, but these errors were encountered: