People have discussed that a lot, for your information, it is clear that not always getLine1Number() can return the mobile number. It depends a lot on network providers / SIM card. Sometimes, the number is not burned on your sim card. Thus, for whom who want to use (own) phone number instead of IMEI, retrieving the mobile number from phone is somehow not always reliable... Anyway, Erel is correct when he says so far it is the only way we can use to get the phone number. But in some devices (depending on network providers) it can return Null.
You can find alternative solutions from here:
http://stackoverflow.com/questions/2480288/get-phone-number-in-android-sdk
or here:
http://stackoverflow.com/questions/...ile-number-of-current-sim-card-in-real-device
For example, you can:
1) ask the user to enter his / her own phone number; or
2) you can use GetSimSerialNumber instead. Sim Serial number is always available and always unique;