0

In say, mobile Safari, can I get the device's phone number? Presumably this would prompt the user if its allowed like it does with location.

Sean Johnson
  • 657
  • 1
  • 7
  • 9
  • And what exactly would you need that phone number for ..? – Emerion Oct 12 '10 at 14:47
  • Building a communication brokering app... think some elements of Google Voice and you get some of the idea. With their permission, would want to broker communication to them via SMS or Voice call. Getting the # with their permission rather than having them enter it is just to have a better user experience. Also makes me more confident it's actually there number and not someone else's. – Sean Johnson Dec 02 '10 at 20:21

1 Answers1

1

It is possible in some cases that the number is sent through in a header from the network operator themselves. (i.e. you won't see it via wifi)

Different operators use different headers:

e.g.

  • X-UP-CALLING-LINE-ID (Vodacom South Africa)
  • x-up-subno (Google Adsense's Mobile code snippet looks at this amongst others)

Some Device ID headers that might contain the MSIDSN of the user.

  • x-dcmguid
  • x-up-subno
  • x-jphone-uid
  • x-em-uid

There are a bunch more here: http://mobiforge.com/developing/blog/useful-x-headers

You will have to look at your target market (what network they typically come from) to know which headers will cover the most users for you.

Community
  • 1
  • 1
David d C e Freitas
  • 7,481
  • 4
  • 58
  • 67