Partager via


Activity.ShouldShowRequestPermissionRationale Method

Definition

Overloads

ShouldShowRequestPermissionRationale(String)

Gets whether you should show UI with rationale before requesting a permission.

ShouldShowRequestPermissionRationale(String, Int32)

Gets whether you should show UI with rationale before requesting a permission.

ShouldShowRequestPermissionRationale(String)

Gets whether you should show UI with rationale before requesting a permission.

[Android.Runtime.Register("shouldShowRequestPermissionRationale", "(Ljava/lang/String;)Z", "GetShouldShowRequestPermissionRationale_Ljava_lang_String_Handler", ApiSince=23)]
public virtual bool ShouldShowRequestPermissionRationale (string permission);
[<Android.Runtime.Register("shouldShowRequestPermissionRationale", "(Ljava/lang/String;)Z", "GetShouldShowRequestPermissionRationale_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member ShouldShowRequestPermissionRationale : string -> bool
override this.ShouldShowRequestPermissionRationale : string -> bool

Parameters

permission
String

A permission your app wants to request.

Returns

Whether you should show permission rationale UI.

Attributes

Remarks

Gets whether you should show UI with rationale before requesting a permission.

Java documentation for android.app.Activity.shouldShowRequestPermissionRationale(java.lang.String).

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

ShouldShowRequestPermissionRationale(String, Int32)

Gets whether you should show UI with rationale before requesting a permission.

[Android.Runtime.Register("shouldShowRequestPermissionRationale", "(Ljava/lang/String;I)Z", "GetShouldShowRequestPermissionRationale_Ljava_lang_String_IHandler", ApiSince=35)]
public virtual bool ShouldShowRequestPermissionRationale (string permission, int deviceId);
[<Android.Runtime.Register("shouldShowRequestPermissionRationale", "(Ljava/lang/String;I)Z", "GetShouldShowRequestPermissionRationale_Ljava_lang_String_IHandler", ApiSince=35)>]
abstract member ShouldShowRequestPermissionRationale : string * int -> bool
override this.ShouldShowRequestPermissionRationale : string * int -> bool

Parameters

permission
String

A permission your app wants to request.

deviceId
Int32

The app is requesting permissions for this device. The primary/physical device is assigned Context#DEVICE_ID_DEFAULT, and virtual devices are assigned unique device Ids.

Returns

Whether you should show permission rationale UI.

Attributes

Remarks

Gets whether you should show UI with rationale before requesting a permission.

Java documentation for android.app.Activity.shouldShowRequestPermissionRationale(java.lang.String, int).

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