Skip to content

Instantly share code, notes, and snippets.

@erchenger
Created January 4, 2016 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erchenger/1442dac0dd2277053b24 to your computer and use it in GitHub Desktop.
Save erchenger/1442dac0dd2277053b24 to your computer and use it in GitHub Desktop.
System Alert Window Permission
if (!Settings.canDrawOverlays(this)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, REQUEST_CODE);
} else {
// You have the ability to add things to the window manually
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment