DeviceAdminReceiver.OnChoosePrivateKeyAlias Method

Definition

Allows this receiver to select the alias for a private key and certificate pair for authentication.

[Android.Runtime.Register("onChoosePrivateKeyAlias", "(Landroid/content/Context;Landroid/content/Intent;ILandroid/net/Uri;Ljava/lang/String;)Ljava/lang/String;", "GetOnChoosePrivateKeyAlias_Landroid_content_Context_Landroid_content_Intent_ILandroid_net_Uri_Ljava_lang_String_Handler", ApiSince=23)]
public virtual string? OnChoosePrivateKeyAlias (Android.Content.Context context, Android.Content.Intent intent, int uid, Android.Net.Uri? uri, string? alias);
[<Android.Runtime.Register("onChoosePrivateKeyAlias", "(Landroid/content/Context;Landroid/content/Intent;ILandroid/net/Uri;Ljava/lang/String;)Ljava/lang/String;", "GetOnChoosePrivateKeyAlias_Landroid_content_Context_Landroid_content_Intent_ILandroid_net_Uri_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member OnChoosePrivateKeyAlias : Android.Content.Context * Android.Content.Intent * int * Android.Net.Uri * string -> string
override this.OnChoosePrivateKeyAlias : Android.Content.Context * Android.Content.Intent * int * Android.Net.Uri * string -> string

Parameters

context
Context

The running context as per #onReceive.

intent
Intent

The received intent as per #onReceive.

uid
Int32

The uid of the app asking for the private key and certificate pair.

uri
Uri

The URI to authenticate, may be null.

alias
String

The alias preselected by the client, or null.

Returns

The private key alias to return and grant access to.

Attributes

Remarks

Allows this receiver to select the alias for a private key and certificate pair for authentication. If this method returns null, the default android.app.Activity will be shown that lets the user pick a private key and certificate pair. If this method returns KeyChain#KEY_ALIAS_SELECTION_DENIED, the default android.app.Activity will not be shown and the user will not be allowed to pick anything. And the app, that called KeyChain#choosePrivateKeyAlias, will receive null back.

Java documentation for android.app.admin.DeviceAdminReceiver.onChoosePrivateKeyAlias(android.content.Context, android.content.Intent, int, android.net.Uri, 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