简体   繁体   English

如何访问运行J2ME应用程序的设备的手机号码?

[英]How to access the mobile number of a device on which J2ME application is running?

I am developing an Messaging application using J2ME for which i need to access the mobile number of a device on which application is running. 我正在使用J2ME开发一个Messaging应用程序,为此我需要访问运行该应用程序的设备的手机号码。 I tried to find out the api's related to it but was unable to find it. 我试图找出与之相关的api,但找不到它。 So Plz can any one tell me is there any other method to find the mobile number in J2ME? 所以Plz可以告诉我在J2ME中还有其他方法可以找到手机号码吗?

Well, I think it is possible--create a SIM applet that will extract the MSISDN from one of the Elementary Files (EF) of the SIM (I am not sure which one). 好吧,我认为这是有可能的-创建一个SIM小程序,该小程序将从SIM的一个基本文件(EF)中提取MSISDN(我不确定是哪个)。 Then, with SATSA, make the JME application communicate with the SIM applet. 然后,使用SATSA,使JME应用程序与SIM applet通信。

From what I know, that's impossible, not all J2ME devices are mobile phones and even if the device running J2ME is a mobile phone its not always aware of its phone number. 据我所知,这不可能,并非所有的J2ME设备都是手机,即使运行J2ME的设备是手机,也不总是知道它的电话号码。 There are some tips and tricks to accomplish this task eg. 有一些技巧和窍门可以完成此任务,例如。 from a way for some Nokia devices ( look here ) by reading some system properties ('com.nokia.mid.msisdn') to some 'silly' ways of sending an sms to a specially prepared sms receiver/sender who just replies another sms, then your application can listen to incoming sms with a specific data and read its mobile number. 从读取某些系统属性(“ com.nokia.mid.msisdn”)到某些诺基亚设备的方式( 参见此处 ),到一些“愚蠢”的方式,向专门准备的短信接收者/发送者发送短信,后者只是回复了另一条短信,则您的应用程序可以侦听带有特定数据的短信并读取其手机号码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM