Hello,
We are developing an application that downloads and manage eSIM profiles. Since Android 13, we have an issue on Samsung S20 when compiling the app to API level 33.
From Android 13, the switchToSubscription
method has a portIndex
parameter.
[EuiccManager | Android Developers]
Getting the port index and verifying that we have the entitlement to manage the eSIM works fine.
The profile was downloaded using the same app, so it has carrier privileges.
It works from the system obviously, but we are doing it from an application.
The error we are getting:
FATAL EXCEPTION: main
[...], PID: 22231
java.lang.SecurityException: Must have carrier privileges to use switchToSubscription with portIndex
at android.telephony.evicc.EviccManager.switchToSubscription(EuiccManager.java:1297)
As said, the SubscriptionManager.canManageSubscription(subscriptionInfo)
answers true
.
Would anyone knows a way to make this work?
Thanks,
Johann