다음 this tutorial 연락처 목록에있는 사람의 전화 번호를 얻으려고합니다. 나는이 같은 전화 번호를 얻기 위해 노력이 추론에 따라Android 커서에서 전화 번호를 가져 오는 방법은 무엇입니까?
if (cursor.moveToFirst()){
int emailIdx = cursor.getColumnIndex(Email.DATA);
String email = cursor.getString(emailIdx);
Log.wtf("Email address: ", email);
}
:이 코드와 함께 나는 이메일 주소를 얻을 수
if (cursor.moveToFirst()){
int phoneNrIdx = cursor.getColumnIndex(Phone.DATA);
String phoneNr = cursor.getString(phoneNrIdx);
Log.wtf("Phone number:", phoneNr);
}
불행하게도 이것은 또한 이메일 주소를 반환합니다. 이 연락처의 전화 번호를 어떻게 알 수 있습니까? 모든 팁을 환영합니다!
보세요 [여기] (http://www.coderzheaven.com/2011/06/13/get-all-details-from-contacts-in-android/)! – SudoRahul
@ R.J - 내 질문에 대한 직접적인 대답은 아니지만 실제로 매우 유용한 링크입니다. 감사! – kramer65