Kirthana
Kirthana

Reputation: 23

Retrieving Sim Serial Number on Android 13

In Flutter, I want to get the serial number of the sim. I used the package sim_data_plus. It works perfectly fine for Android 12 and lesser versions. But even though the package says that it provides support for Android 12 and above, I am not able to read the serial number of a sim present in a phone running on Android 13. I do not intend to get the mobile number, I intend to get the sim serial number.

Upvotes: 1

Views: 1510

Answers (2)

Sahil Kundaliya
Sahil Kundaliya

Reputation: 85

try this package mobile_number

Upvotes: 0

Anandh Krishnan
Anandh Krishnan

Reputation: 6022

It is not possible to get sim serial number android 10 or higher

  • If your app doesn't have the permission and you try asking for information about non-resettable identifiers anyway, the platform's response varies based on target SDK version:

  • If your app targets Android 10 or higher, a SecurityException occurs. If your app targets Android 9 (API level 28) or lower, the method returns null or placeholder data if the app has the READ_PHONE_STATE permission. Otherwise, a SecurityException occurs.

According to android's official document

enter image description here

Upvotes: 2

Related Questions