Android.Security.KeyChain.ChoosePrivateKeyAlias Method
Launches an Activity for the user to select the alias for a private key and certificate pair for authentication.

Syntax

[Android.Runtime.Register("choosePrivateKeyAlias", "(Landroid/app/Activity;Landroid/security/KeyChainAliasCallback;[Ljava/lang/String;[Ljava/security/Principal;Ljava/lang/String;ILjava/lang/String;)V", "")]
public static void ChoosePrivateKeyAlias (Android.App.Activity activity, IKeyChainAliasCallback response, string[] keyTypes, Java.Security.IPrincipal[] issuers, string host, int port, string alias)

Parameters

activity
The Android.App.Activity context to use for launching the new sub-Activity to prompt the user to select a private key; used only to call startActivity(); must not be null.
response
Callback to invoke when the request completes; must not be null
keyTypes
The acceptable types of asymmetric keys such as "RSA" or "DSA", or a null array.
issuers
The acceptable certificate issuers for the certificate matching the private key, or null.
host
The host name of the server requesting the certificate, or null if unavailable.
port
The port number of the server requesting the certificate, or -1 if unavailable.
alias
The alias to preselect if available, or null if unavailable.

Remarks

Launches an Activity for the user to select the alias for a private key and certificate pair for authentication. The selected alias or null will be returned via the KeyChainAliasCallback callback.

keyTypes and issuers may be used to highlight suggested choices to the user, although to cope with sometimes erroneous values provided by servers, the user may be able to override these suggestions.

host and port may be used to give the user more context about the server requesting the credentials.

alias allows the chooser to preselect an existing alias which will still be subject to user confirmation.

[Android Documentation]

Requirements

Namespace: Android.Security
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 14