If the mobile has Dual SIM card How can I get the device phone number using device info in react-native? I have added READ_PHONE_STATE permission in XML file. And added run time permissions PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE. but I am getting the number empty. if its single SIM card I am able to get the device phone number.
Asked
Active
Viewed 2,647 times
3
-
this has nothing to do with dual USIM; later API might return an empty number. – Martin Zeitler Mar 06 '19 at 03:46
-
i there any other way to get phone number in dual sim case – Pratap Penmetsa Mar 06 '19 at 03:48
-
Possible duplicate of [Programmatically obtain the phone number of the Android phone](https://stackoverflow.com/questions/2480288/programmatically-obtain-the-phone-number-of-the-android-phone) – Andrew Mar 06 '19 at 06:35
-
1@PratapPenmetsa have you got the solution for getting phone number in react native??? if yes please tell me the proccess example code, i tried using DeviceInfo getPhoneNumber() but it return empty null and also i used react-native-sim-data module but it also return null. – Raikumar Khangembam Oct 26 '20 at 12:18
-
@RaikumarKhangembam no i didn't got any solution if its a dual sim we are not able to fetch mobile number. – Pratap Penmetsa Oct 26 '20 at 13:41