2011-09-22 30 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卡號碼。