Package 

Class OverlayPermission


  • 
    public class OverlayPermission
    
                        

    Provides queries and actions that are required for dealing with the user permission to display window overlays. Attempting to display a window overlay without permission results in a crash.

    • Method Summary

      Modifier and Type Method Description
      static boolean hasRuntimePermissionToDrawOverlay(@NonNull() Context context) Does this app have permission to display Views as an overlay above all other apps?
      static Intent createIntentToRequestOverlayPermission(@NonNull() Context context) Starting with Android M, a runtime permission is required to be able to display UI elementsas an overlay above all other apps.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createIntentToRequestOverlayPermission

        @NonNull() static Intent createIntentToRequestOverlayPermission(@NonNull() Context context)

        Starting with Android M, a runtime permission is required to be able to display UI elementsas an overlay above all other apps. This method creates and returns an Intent that promptsthe user for this permission.

        Parameters:
        context - context