如何在用J2ME编写的应用程序中获取网络运营商名称?
我最近试图开发一个诺基亚s40上的应用程序,这应该有一个特定的网络运营商的独家访问。有没有这样的API或库?
发布于 2012-03-26 06:19:38
没有这样的事情。但您可以从IMSI获取MNC和MCC信息。有了这些信息,您就可以获得操作员名称
示例
String imsi = System.getProperty("IMSI"); // Example 234103530089555
String mcc = imsi.substring(0,3); // 234 (UK)
String mnc = imsi.substring(3,5); // 10 (O2)您可以将信息发送到数据库以获取国家/地区、网络运营商、网络名称和状态
有关IMSI的更多信息,请参阅http://www.numberingplans.com/?page=analysis&sub=imsinr
=======更新=====
请注意,这取决于电话类型。下面是我所知道的不同格式...更多的可能还在外面。
System.getProperty("phone.imei");
System.getProperty("com.nokia.IMEI");
System.getProperty("com.nokia.mid.imei");
System.getProperty("com.sonyericsson.imei");
System.getProperty("IMEI");
System.getProperty("com.motorola.IMEI");
System.getProperty("com.samsung.imei");
System.getProperty("com.siemens.imei");
System.getProperty("imei");https://stackoverflow.com/questions/9861368
复制相似问题