Esim: carrier privileges returns false

385 views Asked by At

I shared app's release sha-256 key and package name with eSim creating vendor, he added to profile metadata, but

fun checkCarrierPrivileges(): Boolean {
    val telephonyManager =
        context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
    val isCarrier = telephonyManager.hasCarrierPrivileges()
    return if (isCarrier) {
        Log.i(EsimHandler.TAG_ESIM, context.getString(R.string.ready_carrier_privileges))
        true
    } else {
        Log.i(
            EsimHandler.TAG_ESIM,
            context.getString(R.string.no_carrier_privileges_detected)
        )
        false
    }
}

code returns false

when I have manualy added LPA code that vendor gave me to samsung S21, I saw metadata on Logcat, package name and SHA-256 is included in it

UPDATE: set up eSim was working on release mode, i have checked it using flutter run --release but after i published app to play store set up eSim is not working resultCode is EMBEDDED_SUBSCRIPTION_RESULT_ERROR and logCat says Caller does not have carrier privilege in metadata.

0

There are 0 answers