知乎专栏 |
设备 ID
String androidId = Settings.System.getString(getContentResolver(), "android_id"); this.androidId = Settings.System.getString(ContextHolder.getContext().getApplicationContext().getContentResolver(), Settings.Secure.ANDROID_ID); private String android_id = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID);