다음을 통해 공유


RoleManager.CreateRequestRoleIntent(String) Method

Definition

Returns an Intent suitable for passing to android.app.Activity#startActivityForResult(Intent, int) which prompts the user to grant a role to this application.

[Android.Runtime.Register("createRequestRoleIntent", "(Ljava/lang/String;)Landroid/content/Intent;", "", ApiSince=29)]
public Android.Content.Intent CreateRequestRoleIntent (string roleName);
[<Android.Runtime.Register("createRequestRoleIntent", "(Ljava/lang/String;)Landroid/content/Intent;", "", ApiSince=29)>]
member this.CreateRequestRoleIntent : string -> Android.Content.Intent

Parameters

roleName
String

the name of requested role

Returns

the Intent to prompt user to grant the role

Attributes

Remarks

Returns an Intent suitable for passing to android.app.Activity#startActivityForResult(Intent, int) which prompts the user to grant a role to this application.

If the role is granted, the resultCode will be android.app.Activity#RESULT_OK, otherwise it will be android.app.Activity#RESULT_CANCELED.

Java documentation for android.app.role.RoleManager.createRequestRoleIntent(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