This is an extension to the question here. Now I quote CommonsWare
There is no reliable way to retrieve mobile number of device programatically. The only option remaining and I can think of is getting user to input for the phone number.
My question is how to check if the phone number entered by the user is correct for these and any more possibilities which I cannot think now:
I have spend sufficient time on StackOverflow and web and this is not a duplicate question.
I will appreciate any help, clues or suggestions.
Apps That Give Out Free Phone NumbersGoogle Voice is one example, but there are many others that will give you a real phone number to make and receive internet calls. For example, you can download the FreedomPop app, the TextNow app, or the TextFree app from their respective websites.
Find My SIM Card Number on an AndroidGo to Settings > About Phone > Status, then scroll down and locate the ICCID (SIM Card) number.
1.The number entered by the user is of the same device the app has been downloaded on.
Again this is something kind of impossible to test, else the Tricky way mentioned by @neteinstein
2.User did not make any typographical error while entering the number
3.User did not enter any local calling code like leading 0
I think you still not aware of this library by google,used for Parsing/formatting/validating phone numbers for all countries/regions of the world.
Using that you can achive your other 2 solutions.I think.
Link : http://code.google.com/p/libphonenumber/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With