I try to show alert when screen is locked I googled about screen locked but i do not know how i can check when screen is locked. I found one post but i do not know how this method working this post
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
But I don't know how to show alert when screen is locked, If anyone knows solution please help me.