Reputation:
So there's a plist boolean in PhoneGap referencing the user's phone number? Can this be acquired? This StckOverflow question suggests not: Programmatically get own phone number in iOS
I'd like to auto-populate my iBlipper.com app for the message "my number is..."
Upvotes: 3
Views: 10203
Reputation: 4978
Here's a blog post on getting the phone number for android, but it covers common js that you'll need: http://simonmacdonald.blogspot.com/2012/12/how-to-get-devices-phone-number-using.html
However, it looks like you can't use objective C to get a phone number from the phone without user interaction (using standard APIs): Programmatically get own phone number in iOS
So you might be out of luck.
Upvotes: 0
Reputation:
The wording of this is perhaps a bit ambiguous. If you look at the documentation for the UIWebView property detectsPhoneNumbers in the XCode documentation browser, you'll see that it doesn't detect the user's phone number, but rather identifies phone numbers in the HTML.
Here's a snippet from the relevant documentation:
By default, a web view automatically converts telephone numbers that appear in web content to Phone links. When a Phone link is tapped, the Phone application launches and dials the number. Set the detectsPhoneNumbers property to NO to turn off this default behavior.
The only way to uniquely identify an individual device is through its device ID property. This isn't an easy-to-read value, and only identifies the handset. So if a person buys a new phone, or sells their phone to someone else, the device ID is different.
Upvotes: 1