ActivityManager.IsActivityStartAllowedOnDisplay Method

Definition

Check if the context is allowed to start an activity on specified display.

[Android.Runtime.Register("isActivityStartAllowedOnDisplay", "(Landroid/content/Context;ILandroid/content/Intent;)Z", "GetIsActivityStartAllowedOnDisplay_Landroid_content_Context_ILandroid_content_Intent_Handler", ApiSince=29)]
public virtual bool IsActivityStartAllowedOnDisplay (Android.Content.Context context, int displayId, Android.Content.Intent intent);
[<Android.Runtime.Register("isActivityStartAllowedOnDisplay", "(Landroid/content/Context;ILandroid/content/Intent;)Z", "GetIsActivityStartAllowedOnDisplay_Landroid_content_Context_ILandroid_content_Intent_Handler", ApiSince=29)>]
abstract member IsActivityStartAllowedOnDisplay : Android.Content.Context * int * Android.Content.Intent -> bool
override this.IsActivityStartAllowedOnDisplay : Android.Content.Context * int * Android.Content.Intent -> bool

Parameters

context
Context

Source context, from which an activity will be started.

displayId
Int32

Target display id.

intent
Intent

Intent used to launch an activity.

Returns

true if a call to start an activity on the target display is allowed for the provided context and no SecurityException will be thrown, false otherwise.

Attributes

Remarks

Check if the context is allowed to start an activity on specified display. Some launch restrictions may apply to secondary displays that are private, virtual, or owned by the system, in which case an activity start may throw a SecurityException. Call this method prior to starting an activity on a secondary display to check if the current context has access to it.

Java documentation for android.app.ActivityManager.isActivityStartAllowedOnDisplay(android.content.Context, int, android.content.Intent).

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.

Applies to