我如何得到我的Andr​​oid手机中的应用程序的UUID?我的、应用程序、机中、oid

由网友(清风归客)分享简介:我寻求帮助,以获得我的Andr​​oid手机的UUID。我已经搜查了网,发现一个潜在的解决方案,但它不工作的模拟器。I'm looking for help to get the UUID of my Android phone. I have searched the net and found one poten...

我寻求帮助,以获得我的Andr​​oid手机的UUID。我已经搜查了网,发现一个潜在的解决方案,但它不工作的模拟器。

I'm looking for help to get the UUID of my Android phone. I have searched the net and found one potential solution but it is not working in the emulator.

下面是code:

Class<?> c;
try {
    c = Class.forName("android.os.SystemProperties");
    Method get = c.getMethod("get", String.class);
    serial = (String) get.invoke(c, "ro.serialno");
    Log.d("ANDROID UUID",serial);
} catch (Exception e) {
    e.printStackTrace();
}

有谁知道为什么它不工作,或者有更好的解决办法?

Does anybody know why it isn't working, or have a better solution?

推荐答案

这对我的作品:

TelephonyManager tManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String uuid = tManager.getDeviceId();
阅读全文

相关推荐

最新文章