Created
December 22, 2015 09:44
-
-
Save xanderblinov/01abb0b1bdcbc062e972 to your computer and use it in GitHub Desktop.
Overlay for lock screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name=".MainActivity" | |
android:showOnLockScreen="true"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON| | |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | | |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); | |
setContentView(R.layout.activity_main); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment