jonz94 / capacitor-sim

⚡️ Capacitor plugin to get information from device's sim cards.
https://www.npmjs.com/package/@jonz94/capacitor-sim
BSD Zero Clause License
18 stars 2 forks source link

fix(android): fix phone number is empty string on android 11 and above #6

Closed jonz94 closed 1 year ago

jonz94 commented 1 year ago

Closes #3

For api level >= 30 (android >= 11), READ_PHONE_NUMBERS permission is required. If READ_PHONE_NUMBERS permission is not present, the return phone number will be empty string in some cases.

See: https://developer.android.com/reference/android/telephony/SubscriptionInfo#getNumber()

image