Share via


EuiccManager.DownloadSubscription Method

Definition

Attempt to download the given DownloadableSubscription.

[Android.Runtime.Register("downloadSubscription", "(Landroid/telephony/euicc/DownloadableSubscription;ZLandroid/app/PendingIntent;)V", "GetDownloadSubscription_Landroid_telephony_euicc_DownloadableSubscription_ZLandroid_app_PendingIntent_Handler", ApiSince=28)]
[Android.Runtime.RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS")]
public virtual void DownloadSubscription (Android.Telephony.Euicc.DownloadableSubscription? subscription, bool switchAfterDownload, Android.App.PendingIntent? callbackIntent);
[<Android.Runtime.Register("downloadSubscription", "(Landroid/telephony/euicc/DownloadableSubscription;ZLandroid/app/PendingIntent;)V", "GetDownloadSubscription_Landroid_telephony_euicc_DownloadableSubscription_ZLandroid_app_PendingIntent_Handler", ApiSince=28)>]
[<Android.Runtime.RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS")>]
abstract member DownloadSubscription : Android.Telephony.Euicc.DownloadableSubscription * bool * Android.App.PendingIntent -> unit
override this.DownloadSubscription : Android.Telephony.Euicc.DownloadableSubscription * bool * Android.App.PendingIntent -> unit

Parameters

subscription
DownloadableSubscription

the subscription to download.

switchAfterDownload
Boolean

if true, the profile will be activated upon successful download.

callbackIntent
PendingIntent

a PendingIntent to launch when the operation completes.

Attributes

Remarks

Attempt to download the given DownloadableSubscription.

Requires the android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS permission, or the calling app must be authorized to manage both the currently-active subscription on the current eUICC and the subscription to be downloaded according to the subscription metadata. Without the former, an #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR will be returned in the callback intent to prompt the user to accept the download.

On a multi-active SIM device, requires the android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS permission, or a calling app only if the targeted eUICC does not currently have an active subscription or the calling app is authorized to manage the active subscription on the target eUICC, and the calling app is authorized to manage any active subscription on any SIM. Without it, an #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR will be returned in the callback intent to prompt the user to accept the download. The caller should also be authorized to manage the subscription to be downloaded.

If device support PackageManager#FEATURE_TELEPHONY_EUICC_MEP and switchAfterDownload is true, the subscription will be enabled on an esim port based on the following selection rules: <ul> <li>In SS(Single SIM) mode, if the embedded slot already has an active port, then download and enable the subscription on this port. <li>In SS mode, if the embedded slot is not active, then try to download and enable the subscription on the default port 0 of eUICC. <li>In DSDS mode, find first available port to download and enable the subscription. (see #isSimPortAvailable(int)) </ul> If there is no available port, an #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR will be returned in the callback intent to prompt the user to disable an already-active subscription.

Java documentation for android.telephony.euicc.EuiccManager.downloadSubscription(android.telephony.euicc.DownloadableSubscription, boolean, android.app.PendingIntent).

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