EuiccManager
open class EuiccManager
| kotlin.Any | |
| ↳ | android.telephony.euicc.EuiccManager |
EuiccManager is the application interface to eUICCs, or eSIMs/embedded SIMs.
You do not instantiate this class directly; instead, you retrieve an instance through Context.getSystemService(String) and Context.EUICC_SERVICE. This instance will be created using the default eUICC.
On a device with multiple eUICCs, you may want to create multiple EuiccManagers. To do this you can call createForCardId.
See isEnabled before attempting to use these APIs.
Requires the PackageManager#FEATURE_TELEPHONY_EUICC feature which can be detected using PackageManager.hasSystemFeature(String).
Summary
| Constants | |
|---|---|
| static String |
Intent action to launch the embedded SIM (eUICC) management settings screen. |
| static String |
Broadcast Action: The action sent to carrier app so it knows the carrier setup is not completed. |
| static String |
Intent action sent by a carrier app to launch the eSIM activation flow provided by the LPA UI (LUI). |
| static Int |
Result code for an operation indicating that an unresolvable error occurred. |
| static Int |
Result code for an operation indicating that the operation succeeded. |
| static Int |
Result code for an operation indicating that the user must take some action before the operation can continue. |
| static Int |
Address is missing e. |
| static Int |
Operation such as downloading/switching to another profile failed due to device being carrier locked. |
| static Int |
Certificate needed for authentication is not valid or missing. |
| static Int |
Failure to create a connection. |
| static Int |
Failed to load profile onto eUICC due to Profile Policy Rules. |
| static Int |
There is no more space available on the eUICC for new profiles. |
| static Int |
eUICC is missing or defective on the device. |
| static Int |
The profile's carrier is incompatible with the LPA. |
| static Int |
Failure to load the profile onto the eUICC card. |
| static Int |
The activation code(SGP.22 v2.2 section[4.1]) is invalid. |
| static Int |
The confirmation code(SGP.22 v2.2 section[4.7]) is invalid. |
| static Int |
Failure due to target port is not supported. |
| static Int |
Response format is invalid. |
| static Int |
No profiles available. |
| static Int |
The operation is currently busy, try again later. |
| static Int |
No SIM card is available in the device. |
| static Int |
Timed out while waiting for an operation to complete. |
| static Int |
The eUICC card(hardware) version is incompatible with the software |
| static Long |
Temporary failure to retrieve available memory because eUICC is not ready. |
| static String |
Key for an extra set on |
| static String |
Key for an extra set on |
| static String |
Key for an extra set on |
| static String |
Key for an extra set on |
| static String |
Key for an extra set on |
| static String |
Key for an extra set on |
| static String |
Key for an extra set on actions |
| static String |
Optional meta-data attribute for a carrier app providing an icon to use to represent the carrier. |
| static Int |
The exception of failing to execute an APDU command. |
| static Int |
Download profile error. |
| static Int |
eUICC card error. |
| static Int |
eUICC returned an error defined in GSMA (SGP.22 v2.2) while running one of the ES10x functions. |
| static Int |
HTTP error |
| static Int |
Subscription's metadata error |
| static Int |
SIM slot error. |
| static Int |
SMDX(SMDP/SMDS) error |
| static Int |
SubjectCode[5. |
| static Int |
Generic switching profile error |
| static Int |
Internal system error. |
| Public methods | |
|---|---|
| open EuiccManager |
createForCardId(cardId: Int)Create a new EuiccManager object pinned to the given card ID. |
| open Unit |
deleteSubscription(subscriptionId: Int, callbackIntent: PendingIntent!)Deletes the given subscription. |
| open Unit |
downloadSubscription(subscription: DownloadableSubscription!, switchAfterDownload: Boolean, callbackIntent: PendingIntent!)Attempt to download the given |
| open Long |
Returns the available memory in bytes of the eUICC. |
| open String? |
getEid()Returns the EID identifying the eUICC hardware. |
| open EuiccInfo? |
Returns information about the eUICC chip/device. |
| open Boolean |
Whether embedded subscriptions are currently enabled. |
| open Boolean |
isSimPortAvailable(portIndex: Int)Returns whether the passing portIndex is available. |
| open Unit |
startResolutionActivity(activity: Activity!, requestCode: Int, resultIntent: Intent!, callbackIntent: PendingIntent!)Start an activity to resolve a user-resolvable error. |
| open Unit |
switchToSubscription(subscriptionId: Int, callbackIntent: PendingIntent!)Switch to (enable) the given subscription. |
| open Unit |
switchToSubscription(subscriptionId: Int, portIndex: Int, callbackIntent: PendingIntent)Switch to (enable) the given subscription. |
| open Unit |
updateSubscriptionNickname(subscriptionId: Int, nickname: String?, callbackIntent: PendingIntent)Update the nickname for the given subscription. |
Constants
ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS
static val ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS: String
Intent action to launch the embedded SIM (eUICC) management settings screen.
This screen shows a list of embedded profiles and offers the user the ability to switch between them, download new profiles, and delete unused profiles.
The activity will immediately finish with android.app.Activity#RESULT_CANCELED if isEnabled is false. This is ued by non-LPA app to bring up LUI.
Value: "android.telephony.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS"ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE
static val ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE: String
Broadcast Action: The action sent to carrier app so it knows the carrier setup is not completed.
Value: "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE"ACTION_START_EUICC_ACTIVATION
static val ACTION_START_EUICC_ACTIVATION: String
Intent action sent by a carrier app to launch the eSIM activation flow provided by the LPA UI (LUI). The carrier app must send this intent with one of the following:
EXTRA_USE_QR_SCANNER not set or set to false: The LPA should try to get an activation code from the carrier app by binding to the carrier app service implementing android.service.euicc.EuiccService#ACTION_BIND_CARRIER_PROVISIONING_SERVICE.
EXTRA_USE_QR_SCANNER set to true: The LPA should launch a QR scanner for the user to scan an eSIM profile QR code.
Upon completion, the LPA should return one of the following results to the carrier app:
Activity.RESULT_OK: The LPA has succeeded in downloading the new eSIM profile.
Activity.RESULT_CANCELED: The carrier app should treat this as if the user pressed the back button.
Anything else: The carrier app should treat this as an error.
LPA needs to check if caller's package name is allowed to perform this action.
Value: "android.telephony.euicc.action.START_EUICC_ACTIVATION"EMBEDDED_SUBSCRIPTION_RESULT_ERROR
static val EMBEDDED_SUBSCRIPTION_RESULT_ERROR: Int
Result code for an operation indicating that an unresolvable error occurred. EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE will be populated with a detailed error code for logging/debugging purposes only.
Value: 2EMBEDDED_SUBSCRIPTION_RESULT_OK
static val EMBEDDED_SUBSCRIPTION_RESULT_OK: Int
Result code for an operation indicating that the operation succeeded.
Value: 0EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR
static val EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR: Int
Result code for an operation indicating that the user must take some action before the operation can continue.
Value: 1See Also
ERROR_ADDRESS_MISSING
static val ERROR_ADDRESS_MISSING: Int
Address is missing e.g SMDS/SMDP address is missing.
Value: 10011ERROR_CARRIER_LOCKED
static val ERROR_CARRIER_LOCKED: Int
Operation such as downloading/switching to another profile failed due to device being carrier locked.
Value: 10000ERROR_CERTIFICATE_ERROR
static val ERROR_CERTIFICATE_ERROR: Int
Certificate needed for authentication is not valid or missing. E.g SMDP/SMDS authentication failed.
Value: 10012ERROR_CONNECTION_ERROR
static val ERROR_CONNECTION_ERROR: Int
Failure to create a connection.
Value: 10014ERROR_DISALLOWED_BY_PPR
static val ERROR_DISALLOWED_BY_PPR: Int
Failed to load profile onto eUICC due to Profile Policy Rules.
Value: 10010ERROR_EUICC_INSUFFICIENT_MEMORY
static val ERROR_EUICC_INSUFFICIENT_MEMORY: Int
There is no more space available on the eUICC for new profiles.
Value: 10004ERROR_EUICC_MISSING
static val ERROR_EUICC_MISSING: Int
eUICC is missing or defective on the device.
Value: 10006ERROR_INCOMPATIBLE_CARRIER
static val ERROR_INCOMPATIBLE_CARRIER: Int
The profile's carrier is incompatible with the LPA.
Value: 10003ERROR_INSTALL_PROFILE
static val ERROR_INSTALL_PROFILE: Int
Failure to load the profile onto the eUICC card. e.g 1. iccid of the profile already exists on the eUICC. 2. GSMA(.22 v2.2) Profile Install Result - installFailedDueToDataMismatch 3. operation was interrupted 4. SIMalliance error in PEStatus(SGP.22 v2.2 section 2.5.6.1)
Value: 10009ERROR_INVALID_ACTIVATION_CODE
static val ERROR_INVALID_ACTIVATION_CODE: Int
The activation code(SGP.22 v2.2 section[4.1]) is invalid.
Value: 10001ERROR_INVALID_CONFIRMATION_CODE
static val ERROR_INVALID_CONFIRMATION_CODE: Int
The confirmation code(SGP.22 v2.2 section[4.7]) is invalid.
Value: 10002ERROR_INVALID_PORT
static val ERROR_INVALID_PORT: Int
Failure due to target port is not supported.
Value: 10017ERROR_INVALID_RESPONSE
static val ERROR_INVALID_RESPONSE: Int
Response format is invalid. e.g SMDP/SMDS response contains invalid json, header or/and ASN1.
Value: 10015ERROR_NO_PROFILES_AVAILABLE
static val ERROR_NO_PROFILES_AVAILABLE: Int
No profiles available.
Value: 10013ERROR_OPERATION_BUSY
static val ERROR_OPERATION_BUSY: Int
The operation is currently busy, try again later.
Value: 10016ERROR_SIM_MISSING
static val ERROR_SIM_MISSING: Int
No SIM card is available in the device.
Value: 10008ERROR_TIME_OUT
static val ERROR_TIME_OUT: Int
Timed out while waiting for an operation to complete. i.e restart, disable, switch reset etc.
Value: 10005ERROR_UNSUPPORTED_VERSION
static val ERROR_UNSUPPORTED_VERSION: Int
The eUICC card(hardware) version is incompatible with the software
Value: 10007EUICC_MEMORY_FIELD_UNAVAILABLE
static val EUICC_MEMORY_FIELD_UNAVAILABLE: Long
Temporary failure to retrieve available memory because eUICC is not ready.
Value: -1L