Obtain the smartphone's phone number

I can’t seem to find the answer anywhere, but is there a possibility to get hold of the phone number of the SIM that is in the smartphone? I’m interested in both iOS and Android solutions for this.

Best regards,

~Rob

See below:

There is no guaranteed solution to this problem because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. Phone number assignment happens on the network - and can be changed without changing the SIM card or device (e.g. this is how porting is supported).

http://stackoverflow.com/questions/2480288/how-can-i-programmatically-obtain-the-number-of-the-android-phone-with-the-api

Thanks for responding. 

I can live with a solution that works, say, 80% of the time :slight_smile: It is more of a convenience for the app-user that anything else. I’m asking the user to enter his/her phonenumber and if that box is already filled in, that would be improved user friendliness.

See below:

There is no guaranteed solution to this problem because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. Phone number assignment happens on the network - and can be changed without changing the SIM card or device (e.g. this is how porting is supported).

http://stackoverflow.com/questions/2480288/how-can-i-programmatically-obtain-the-number-of-the-android-phone-with-the-api

Thanks for responding. 

I can live with a solution that works, say, 80% of the time :slight_smile: It is more of a convenience for the app-user that anything else. I’m asking the user to enter his/her phonenumber and if that box is already filled in, that would be improved user friendliness.