Is there a way to get the android lockscreen package name?
I want to show alert on the lockscreen using AlertDialog.Builder
. So I need to know when the
Found a native solution. After you build the Alert dialog and before showing it, apply this:
AlertDialog alertDialog = new AlertDialog.Builder(context).create();
alertDialog.getWindow().setType(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
alertDialog.show();
This will show the dialog on top of the lock screen.