Android Phone Number Verification

andreas78 picture andreas78 · Jan 17, 2013 · Viewed 17.2k times · Source

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();

Answer

ObAt picture ObAt · Jan 17, 2013

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.