Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Phone Number Verification

I need a way to verify that the mobile number set in my Android application is correct as in "ownership" - not data validation of mobile number.

E.g. the way WhatsApp is doing it...

I know how this can be done by SMS verification using codes and stuff. The thing is it's a free Android app and I'm not to keen on paying for every sent SMS when the app is free. Bad business model...

Is there a way to do this safely and free?

Using the API code seem to be not too safe so it's not an option I'm afraid:

TelephonyManager tMgr  (TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
mPhoneNumber = tMgr.getLine1Number();
like image 340
andreas78 Avatar asked Jan 17 '13 19:01

andreas78


1 Answers

WhatsApp does not sent any SMS to you, it sends a SMS with your own mobile phone to your own number. If you receive the SMS everything is OK, if you don't receive a sms you don't own that number. It's the only cheap and easy way to check if a user signed up with their real number.

like image 54
ObAt Avatar answered Sep 28 '22 18:09

ObAt