Code example for KeyguardManager

Methods: inKeyguardRestrictedInputMode

0
			super.onResume(); 
			KeyguardManager kgMgr = 
	    	    (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
			PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
			 
	    	boolean showing = kgMgr.inKeyguardRestrictedInputMode();
 
	    	if(showing==false && pm.isScreenOn())
			Home.splash.start(); 
		} 
		   public void onBackPressed() { 
				// TODO Auto-generated method stub 
				super.onBackPressed(); 
				Home.splash.pause(); 
				finish();
			} 
		   @Override 
		protected void onPause() { 
			// TODO Auto-generated method stub 
			super.onPause(); 
			if(Home.splash.isPlaying())