Android Lock Screen Widget

Lock screen interaction is difficult. Android allows basic operations with two window flags (FLAG_SHOW_WHEN_LOCKED and FLAG_DISMISS_KEYGUARD). FLAG_SHOW_WHEN_LOCKED works pretty consistently in that it will show on top of the lock screen even when security is enabled (the security isn’t bypassed, you can’t switch to another non-FLAG_SHOW_WHEN_LOCKED window). If you’re just doing something temporary, like while … Read more

Android activity over default lock screen

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); try using this flags to disable lock screen when the activity is started. After API level 17 you can use <activity android:name=”.yourActivityName” android:showOnLockScreen=”true” android:screenOrientation=”sensorPortrait” > showOnLockScreen like in the example…