0

I have a pixel 7 with Mep enabled and i am trying to read this data in my app.

I have a physical Sim in a Work profile and an eSim in a Personal profile.

I tried the below code in my MainActivity's onCreate:

val smanager = getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE) as SubscriptionManager

    Log.i("SUBS_TEST", "count -> ${smanager.activeSubscriptionInfoCount}")

    smanager.activeSubscriptionInfoList.forEach {
        Log.i("SUBS_TEST", "mep -> ${it.displayName}")
    }

But the output of the count is always returning 0

Can someone help me on how to get the profiles ?

Mervin Hemaraju
  • 1,921
  • 2
  • 22
  • 71

0 Answers0