안드로이드 개발 질문/답변
(글 수 45,052)
지금 개발중인 프로젝트에서 번호값을 이용해서 사용자를 식별하는 방식으로 진행하려 합니다.
전화번호를 얻을 수 있을 것 같긴한데,, 테블릿의 경우도 있을 수 있으므로 다른 게 필요할거 같습니다.
도와주세요!~
2012.07.12 16:48:26
텔레폰매니저?라는 클래스에 디바이스 id 읽어 올수 있습니다 각 기기마다 적힌 고유번호 인걸로알고 다중 램점채팅도 이것을 이용하는걸로 알고 있습니다
2012.07.12 22:24:55
deviceId 쓰는 방식이 아니라면, 다음을 참고해보세요.
사용예)
String android_id = Secure.getString(getContext().getContentResolver(),Secure.ANDROID_ID);
ANDROID_ID
More specifically, Settings.Secure.ANDROID_ID. This is a 64-bit quantity that is generated and stored when the device first boots. It is reset when the device is wiped.
ANDROID_ID seems a good choice for a unique device identifier. There are downsides: First, it is not 100% reliable on releases of Android prior to 2.2 (“Froyo”). Also, there has been at least one widely-observed bug in a popular handset from a major manufacturer, where every instance has the same ANDROID_ID.
고유값이란게 안드로이드에는 없습니다.
그러니까 그 값이 매우 중요한 값이라면 다른 방법을 생각하셔야 할꺼에요.