public static String getIMEI(Context context){
TelephonyManager TelephonyMgr = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
String szImei = TelephonyMgr.getDeviceId();
return szImei;
}
通过这个就获取了手机唯一标示了,同时你还要在AndroidMainifest.xml中声明权限