开发者

Can a mobile web application access the devices phone number?

In say, mobile Safari, can I get the de开发者_C百科vice's phone number? Presumably this would prompt the user if its allowed like it does with location.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜