KeyChain.ChoosePrivateKeyAliasAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ChoosePrivateKeyAliasAsync(Activity, String[], IPrincipal[], Uri, String) |
Displays the system UI for the user to select a private key alias, filtering by URI. |
| ChoosePrivateKeyAliasAsync(Activity, String[], IPrincipal[], String, Int32, String) |
Displays the system UI for the user to select a private key alias, filtering by host and port. |
ChoosePrivateKeyAliasAsync(Activity, String[], IPrincipal[], Uri, String)
Displays the system UI for the user to select a private key alias, filtering by URI.
public static System.Threading.Tasks.Task<string?> ChoosePrivateKeyAliasAsync(Android.App.Activity activity, string[]? keyTypes, Java.Security.IPrincipal[]? issuers, Android.Net.Uri? uri, string? alias);
static member ChoosePrivateKeyAliasAsync : Android.App.Activity * string[] * Java.Security.IPrincipal[] * Android.Net.Uri * string -> System.Threading.Tasks.Task<string>
Parameters
- activity
- Activity
The activity to use as the parent for the certificate selection UI.
- keyTypes
- String[]
The acceptable types of asymmetric keys, or null to allow any type.
- issuers
- IPrincipal[]
The acceptable certificate issuers for the certificate matching the private key, or null to allow any issuer.
- uri
- Uri
The URI to filter by, or null to allow the user to choose any alias.
- alias
- String
The initial alias to preselect if available, or null for no preselection.
Returns
A Task<TResult> representing the asynchronous operation. The result is the alias chosen by the user,
or null if the user cancelled the selection.
Remarks
This is an async wrapper around ChoosePrivateKeyAlias(Activity, IKeyChainAliasCallback, String[], IPrincipal[], Uri, String). This overload requires Android API 23 or later.
Applies to
ChoosePrivateKeyAliasAsync(Activity, String[], IPrincipal[], String, Int32, String)
Displays the system UI for the user to select a private key alias, filtering by host and port.
public static System.Threading.Tasks.Task<string?> ChoosePrivateKeyAliasAsync(Android.App.Activity activity, string[]? keyTypes, Java.Security.IPrincipal[]? issuers, string? host, int port, string? alias);
static member ChoosePrivateKeyAliasAsync : Android.App.Activity * string[] * Java.Security.IPrincipal[] * string * int * string -> System.Threading.Tasks.Task<string>
Parameters
- activity
- Activity
The activity to use as the parent for the certificate selection UI.
- keyTypes
- String[]
The acceptable types of asymmetric keys, or null to allow any type.
- issuers
- IPrincipal[]
The acceptable certificate issuers for the certificate matching the private key, or null to allow any issuer.
- host
- String
The host name of the server requesting the certificate, or null for no host filtering.
- port
- Int32
The port number of the server requesting the certificate, or -1 if unavailable.
- alias
- String
The initial alias to preselect if available, or null for no preselection.
Returns
A Task<TResult> representing the asynchronous operation. The result is the alias chosen by the user,
or null if the user cancelled the selection.
Remarks
This is an async wrapper around ChoosePrivateKeyAlias(Activity, IKeyChainAliasCallback, String[], IPrincipal[], String, Int32, String).