简体   繁体   中英

Android Device UDID or unique ID?

我想为我的Android应用程序生成android设备唯一ID,以根据用户设备udid创建收藏夹。

All devices have a unique id.

 import android.provider.Settings.Secure;
 private String android_id = Secure.getString(getContext().getContentResolver(),
                                                            Secure.ANDROID_ID); 
private String uDiD = Secure.getString(getContext().getContentResolver(),
                                                        Secure.ANDROID_ID); 

You can use different values as udid. The above mentioned Secure.ANDROID_ID has some cons It can be null It is same on 2.2 and some 4.2 devices You can use MacAddress of device or IMIE address(Can be null on devices without cellular connection)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM