Hi all!
I am using this code to get the phone from the android address book:
Uri myContactURI = Uri.withAppendedPath(Contacts.People.CONTENT_URI,
"Some contact ID");
Cursor cur = managedQuery(myContactURI, null, null, null, null);
if (cur.moveToFirst()) {
Log.d("DEBUGTAG", "first");
String name;
String phoneNumber;
int nameColumn = cur.getColumnIndex(People.NAME);
int phoneColumn = cur.getColumnIndex(People.NUMBER);
String imagePath;
do {
// Get the field values
name = cur.getString(nameColumn);
phoneNumber = cur.getString(phoneColumn);
// Do something with the values.
Log.d("DEBUGTAG", "Contact: name:" + name +" phone:"+
phoneNumber);
} while (cur.moveToNext());
}
But all I get is the default phone. I want to get all phone numbers
including those who have TYPE_OTHER.
Thanks!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en