Tkko / flutter_smart_auth

Flutter package for listening SMS code on Android, suggesting phone number, email, saving a credential.
https://pub.dev/packages/smart_auth
MIT License
43 stars 26 forks source link

Phone number suggestion not working on Android 12 devices #6

Open cscipher opened 2 years ago

cscipher commented 2 years ago

When we request hints for phone number suggestions, the dialog loads for less than a second and then disappears on android 12 devices. I tried with other android versions and it was working fine there.

fidelisakilan commented 2 years ago

+1 Facing similar issue on 3 devices i have tested so far. Samsung m 13 Android 12 Realme 3 pro Android 12 Mi A3 Android 11

danishkhawaja98 commented 1 year ago

Hi @fidelisakilan , @cscipher!

This is not due to the package, android versions or mobile devices. Actually, it's a network carrier issue. You can identify this by going to settings > About Phone > Basic info (Phone number) and assure that you are not getting "Unknown Number" in the field. If you are getting "Unknown Number" then the package would return null, and the dialog will disappear. Here is the image:

Click to view Image ![s2mxgumlic051](https://user-images.githubusercontent.com/114078857/218740537-c97e3b8c-25ae-4b03-a7a2-a81219762917.png)

Possible Solutions:

  1. Eject your sim from android device and insert it into iPhone. Wait for few seconds for the sim info to get read by iPhone. Eject from iPhone and insert again in your android device. Hopefully, now you will be getting "" instead of "Unknown Number."

  2. Some devices like HUAWEI, OPPO etc. has the ability to edit your sim numbers for "Phone Number Hint". You can do this by going to Network & internet > SIM card manager > Click on the pen (or any edit icon) > You can edit your number and save it.

  3. Go to your Network Carrier Office.