KeyChain.CreateInstallIntent 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.
Returns an Intent
that can be used for credential
installation.
[Android.Runtime.Register("createInstallIntent", "()Landroid/content/Intent;", "")]
public static Android.Content.Intent CreateInstallIntent ();
[<Android.Runtime.Register("createInstallIntent", "()Landroid/content/Intent;", "")>]
static member CreateInstallIntent : unit -> Android.Content.Intent
Returns
- Attributes
Remarks
Returns an Intent
that can be used for credential installation. The intent may be used without any extras, in which case the user will be able to install credentials from their own source.
Alternatively, #EXTRA_CERTIFICATE
or #EXTRA_PKCS12
maybe used to specify the bytes of an X.509 certificate or a PKCS#12 key store for installation. These extras may be combined with #EXTRA_NAME
to provide a default alias name for credentials being installed.
When used with Activity#startActivityForResult
, Activity#RESULT_OK
will be returned if a credential was successfully installed, otherwise Activity#RESULT_CANCELED
will be returned.
Starting from android.os.Build.VERSION_CODES#R
, the intent returned by this method cannot be used for installing CA certificates. Since CA certificates can only be installed via Settings, the app should provide the user with a file containing the CA certificate. One way to do this would be to use the android.provider.MediaStore
API to write the certificate to the android.provider.MediaStore.Downloads
collection.
Java documentation for android.security.KeyChain.createInstallIntent()
.
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.