android获取手机唯一标识的方法

内容摘要
复制代码 代码如下:import android.provider.Settings.Secure;
private String android_id = Secure.getString(getContext().getContentResolver(),Secure.ANDROID_ID);
U
文章正文

复制代码 代码如下:

import android.provider.Settings.Secure;

private String android_id = Secure.getString(getContext().getContentResolver(),Secure.ANDROID_ID);

UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
String deviceId = deviceUuid.toString();


代码注释

作者:喵哥笔记

IDC笔记

学的不仅是技术,更是梦想!