anon
anon

Reputation:

Retrieve phone number Windows Mobile

Correct me if Im wrong. Not all operators implement the feature that lets you retrieve the phone number connected to the SIM card. So Im curios about if there is someone with experience regarding this issue on Windows Mobile (primary version 6.0/6.1)

Upvotes: 0

Views: 3058

Answers (2)

Matt Lacey
Matt Lacey

Reputation: 65586

You can't always get the phone number from the SIM card as it may not be there. Details at http://www.newlc.com/topic-5211 (Basically, the phone number is used by the network to route to the SIM registered with the number. The phone doesn't use it so doesn't need it.)

The only thing guaranteed to be on the SIM is the IMSI. There's an example of how to get this at: http://xman892.blogspot.com/2007/07/how-to-series-retrieving-imsi-and-imei.html

There's a C++ sample in the SDK, but this isn't guaranteed to work on all phones. You'll find it in: C:\Program Files\Windows Mobile 6 SDK\Samples\Common\CPP\Win32\GetPhoneNumber

This may also be useful: http://blog.opennetcf.com/ncowburn/CommentView,guid,309b8b8e-ebc7-4078-a8ba-f174761ea7af.aspx

Upvotes: 4

kgiannakakis
kgiannakakis

Reputation: 104196

See this question. You could use TAPI to get the number, but I am not sure that it will work in all phones/operators.

Upvotes: 0

Related Questions