2011-09-22 29 views
-1

如何在Windows Phone 7中获取SIM卡号或手机序列号?在Android中我使用此代码和它的作品:Windows Phone 7中的SIM卡号和序列号

/Get the SIM country ISO code 
    String simCountry = telephonyManager.getSimCountryIso(); 
    // Get the operator code of the active SIM (MCC + MNC) 
    String simOperatorCode = telephonyManager.getSimOperator(); 
    // Get the name of the SIM operator 
    String simOperatorName = telephonyManager.getSimOperatorName(); 
    // -- Requires READ_PHONE_STATE uses-permission -- 
    // Get the SIM’s serial number 
    String simSerial = telephonyManager.getSimSerialNumber(); 
+0

代码是: /获取SIM国家ISO代码 String simCountry = telephonyManager.getSimCountryIso(); //获取激活SIM(MCC + MNC)的运营商代码 String simOperatorCode = telephonyManager.getSimOperator(); //获取SIM运营商的名称 String simOperatorName = telephonyManager.getSimOperatorName(); // - 需要READ_PHONE_STATE使用权限 - //获取SIM的序列号 String simSerial = telephonyManager.getSimSerialNumber(); – Edon

+0

可能重复[如何查找分配给电话的号码?](http://stackoverflow.com/questions/7339095/how-do-i-find-the-number-assigned-to-a-phone) –

+0

可能的重复[在C#中检索Windows Phone 7中的自己的单元格号](http://stackoverflow.com/questions/5099932/retrieving-own-cell-number-in-windows-phone-7-in-c) – ctacke

回答

3

没有API供第三方开发人员访问手机或SIM卡号码。