Closed harshallcode closed 1 year ago
Sorry for the late reply...
In some circumstances, the phone number will return an empty string, so I think this might be the excepted behavior.
For your situation, the reason why it works on Android 13 but not on Android <= 12 might be the fact that Android 13 has a newer API, which behaves differently from the API for Android <= 12.
For now, I'm not 100% sure if this issue is a bug or not. I will conduct further investigation and provide more information here.
Thanks for the response. I also believe the new API and permissions in Android 13 must've given it access to phone numbers not found inside the setting itself.
If the mobile number is not set in the sim card settings, the number returns an empty string. However, android 13 fetches the user's phone number properly even if the number is not set in settings.