android获取设备唯一标识UID

    技术2024-11-20  5

     

    protected static String getUid() {

    String id = android.provider.Settings.System.getString(context

    .getContentResolver(),

    android.provider.Settings.System.ANDROID_ID);

    if (id == null && telephonyManager != null) {

    id = telephonyManager.getDeviceId();

    }

    if (id == null) {

    id = "0000000000000000";

    }

    return id;

    }

     

    最新回复(0)