Android examples for User Interface:Screen Lock
get Keyguard Lock Screen Is Showing
//package com.java2s; import android.app.KeyguardManager; import android.content.Context; public class Main { public static boolean getKeyguardLockScreenIsShowing(Context context) { KeyguardManager keyguardManager = (KeyguardManager) context .getSystemService(Context.KEYGUARD_SERVICE); return keyguardManager.inKeyguardRestrictedInputMode(); }//w w w. j a v a 2 s .co m }