Settings.CanDrawOverlays(Context) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks if the specified context can draw on top of other apps.
[Android.Runtime.Register("canDrawOverlays", "(Landroid/content/Context;)Z", "", ApiSince=23)]
public static bool CanDrawOverlays (Android.Content.Context? context);
[<Android.Runtime.Register("canDrawOverlays", "(Landroid/content/Context;)Z", "", ApiSince=23)>]
static member CanDrawOverlays : Android.Content.Context -> bool
Parameters
- context
- Context
App context.
Returns
true if the specified context can draw on top of other apps, false otherwise
- Attributes
Remarks
Checks if the specified context can draw on top of other apps. As of API level 23, an app cannot draw on top of other apps unless it declares the android.Manifest.permission#SYSTEM_ALERT_WINDOW
permission in its manifest, <em>and</em> the user specifically grants the app this capability. To prompt the user to grant this approval, the app must send an intent with the action android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION
, which causes the system to display a permission management screen.
Java documentation for android.provider.Settings.canDrawOverlays(android.content.Context)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.