Last active
March 9, 2018 15:22
-
-
Save vtthach/da0ceaa6c0448680d82b4fef1fadc333 to your computer and use it in GitHub Desktop.
Draw over other app - SYSTEM_ALERT_WINDOW
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
Every app that requests the SYSTEM_ALERT_WINDOW permission and that is installed through the Play Store | |
(version 6.0.5 or higher is required), will have granted the permission automatically. | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){ | |
// Show alert dialog to the user saying a separate permission is needed | |
// Launch the settings activity if the user prefers | |
Intent myIntent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION); | |
startActivity(myIntent); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment