如何以编程方式拨打 *#100# 并检索我自己的电话号码?
在 Windows Mobile 6 手机上,我需要检索设备中 SIM 卡的电话号码。 我可以手动拨打*#100#,电话号码会出现在屏幕上。
有谁知道如何以编程方式执行此操作?
最好是 C#,但 C++ 也可以,我可以翻译。
SystemState.OwnerNumber
仅返回一个空字符串(可能依赖于 SIM 中正确存储的号码),但 *#100# 有效。
On a window mobile 6 phone I need to retrieve the phone number of the SIM card in the device.
I can manually dial *#100# and the phone number appears on the screen.
Does anybody know how to do this programmatically?
Preferably in C# but C++ will do, I can translate.
SystemState.OwnerNumber
just returns an empty string (probably relies on the number being stored in the SIM correctly) but *#100# works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
电话号码实际上并不存储在 SIM 卡上,而是存储在称为 HLR 的移动网络数据库中。在那里,用户友好的电话号码与称为 IMSI 的订阅 ID 相匹配,该 ID 物理存储在您的 SIM 卡上。
因此,为了检索电话号码,设备必须允许您的应用程序在网络上进行通信。
The phone number isn't actually stored on the SIM card but in a mobile network database called HLR. There the user friendly phone number is matched with a subscription id called IMSI which is physically stored on your SIM card.
So in order to retrieve the phone number your application must be allowed by the device to communicate on the network.
获取手机 SIM 卡上的号码的一种方法是向某个服务器正在侦听的某个号码发送短信。短信将携带发件人的电话号码。一旦您的服务器收到短信,服务器就可以向您的客户端应用程序发送一条推送消息,其中包含客户端所需的电话号码。希望这有帮助。
A way to get the number on the sim card of a phone is to send an sms to some number which some server is listening on. The sms will carry along the phone number of the sender. Once your server receives the sms, the server can then send a push message to your client application with the phone number the client needs. Hope this helps.