가끔 Non-Phone Feature 안드로이드에서 null 값을 반환한다. 따라서 기기에 Unique한 ID를 만들필요가 있을 때가 있다. 먼저 앱에 접근 권한을 주고, final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE); final String tmDevice, tmSerial, androidId; tmDevice = "" + tm.getDeviceId(); tmSerial = "" + tm.getSimSerialNumber(); androidId = "" + android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); UUID deviceUuid = new UUID.......
↧