如何获取诺基亚 E71 的小区 ID、MCC、LAC?
我正在使用下面的代码,但找不到 cellid、MCC、LAC 值。
我尝试通过 j2me 代码找到这个值。
请帮我找到这个值
获取单元格ID的代码:
public static String getCellId() { String out = ""; 尝试 {
out = System.getProperty("Cell-ID"); // if (out == null || out.equals("null") || out.equals("")) { // out = System.getProperty("CellID"); // } // if
(out == null || out.equals("null") || out.equals("")) { //
System.getProperty("phone.cid"); // }if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("com.nokia.mid.cellid"); } } catch (Exception e) { return out == null ? "" : out; } return out == null ? "" : out; }
获取 LAC 的代码:
public static String getLAC() { String out = ""; try { if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("com.nokia.mid.lac"); } } catch (Exception e) { return out == null ? "" : out; } return out == null ? "" : out; }
获取IMSI的代码:
public static String getIMSI() { String out = ""; try { out = System.getProperty("IMSI"); if (out == null || out.equals("null") || out.equals("")) { System.getProperty("phone.cid"); } if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("com.nokia.mid.mobinfo.IMSI"); } if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("com.nokia.mid.imsi"); } } catch (Exception e) { return out == null ? "" : out; } return out == null ? "" : out; }
获取 MCC 的代码:
public static String getMCC() { String out = ""; try { if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("phone.mcc"); } if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("com.nokia.mid.mobinfo.IMSI"); } if (out == null || out.equals("null") || out.equals("")) { out = getIMSI().equals("") ? "" : getIMSI().substring(0, 3); } if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("com.siemens.imei"); } if (out == null || out.equals("null") || out.equals(""))//getMNC() { if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("mcc"); } } } catch (Exception e) { return out == null ? "" : out; } return out == null ? "" : out; }
获取 MNC 的代码:
public static String getMNC() { String out = ""; try { if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("phone.mnc"); } if (out == null || out.equals("null") || out.equals("")) { out = getIMSI().equals("") ? "" : getIMSI().substring(3, 5); } if (out == null || out.equals("null") || out.equals("")) { out = getIMSI().equals("") ? "" : getIMSI().substring(3, 5); } if (out == null || out.equals("null") || out.equals(""))//getMNC() { if (out == null || out.equals("null") || out.equals("")) { out = System.getProperty("mnc"); } } } catch (Exception e) { return out == null ? "" : out; } return out == null ? "" : out; }
你是否使用我的代码