获取手机及SIM卡相关信息
/**
* 获取手机及SIM卡相关信息
* @param context
* @return
*/
public static Map<String, String> getPhoneInfo(Context context) {
Map<String, String> map = new HashMap<String, String>();
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
String imei = tm.getDeviceId();
String imsi = tm.getSubscriberId();
String phoneMode = android.os.Build.MODEL;
String phoneSDk = android.os.Build.VERSION.RELEASE;
map.put("imei", imei);
map.put("imsi", imsi);
map.put("phoneMode", phoneMode+"##"+phoneSDk);
map.put("model", phoneMode);
map.put("sdk", phoneSDk);
return map;
}