안드로이드 개발 질문/답변
(글 수 45,052)
final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
final String tmDevice, tmSerial, androidId;
tmDevice = "" + tm.getDeviceId();
tmSerial = "" + tm.getSimSerialNumber();
androidId = "" + android.provider.Settings.Secure.getString(
context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
String deviceId = deviceUuid.toString();
코드는 위와 같습니다. 유니크한 값을 얻기위해 저렇게 들 많이 쓰시던데,,
저렇게 해서 유니크한 값을 얻어 사용해도 되겠죠?
나중에 무슨 문제가 생길 소지가 있는지 궁금합니다.




http://www.androidpub.com/2229976