You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used your library to get the phone number, but it doesn't work with eSIM. I tried replacing subscriptionInfo.getNumber();
with final int id = SubscriptionManager.getActiveDataSubscriptionId(); final String phoneNumber = subscriptionManager.getPhoneNumber(id);
and it worked. This method was added in API 33 to replace the deprecated getNumber()
I used your library to get the phone number, but it doesn't work with eSIM. I tried replacing
subscriptionInfo.getNumber();
with
final int id = SubscriptionManager.getActiveDataSubscriptionId(); final String phoneNumber = subscriptionManager.getPhoneNumber(id);
and it worked. This method was added in API 33 to replace the deprecated getNumber()
doc: https://developer.android.com/reference/kotlin/android/telephony/SubscriptionManager#getphonenumber_1
The text was updated successfully, but these errors were encountered: