Android的唯一UDID [英] Android unique UDID

查看:860
本文介绍了Android的唯一UDID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我,如果我一直在使用code是正确的方式来获得唯一的ID?我怀疑我可能有愚弄了那里,这可能对行政水平,我公司会造成问题...

 最后TelephonyManager TM =(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
字符串UDID = tm.getDeviceId();


解决方案

这是调用的正确方法 getDeviceId()。这可能不是唯一的标识符,因为不是所有的设备都电话和一些手机有错误。请参见本Android开发者博客帖子了解更多详情。

Can someone tell me if the code I have been using is the proper way to get the unique id? I am suspecting i may have dupes out there and this could be causing issues on an administrative level in my company...

final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
String UDID = tm.getDeviceId();

解决方案

It is the proper way to call getDeviceId(). That may not be a unique identifier, since not all devices are phones and some phones have bugs. See this Android Developers Blog post for more details.

这篇关于Android的唯一UDID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆