I added some contacts via content resolver queries, but they are not
showing up in the phone's Contact application. However, when I go
over the database with a cursor, they show up.
Could this be an issue with the emulator? I don't have a device to
test on at the moment. Also, the contact was added using the code
below. I then used that URI to associate a new number with the
contact.
Anyone have any ideas what might be going on? Thanks!
ADD CONTACT:
values.put(Contacts.People.NAME, name);
Uri record = mContext.getContentResolver().insert
(Contacts.People.CONTENT_URI, values);
LOOP THROUGH DB:
Cursor c = this.getContentResolver().query
(Contacts.People.CONTENT_URI, null, null, null, null);
c.moveToPosition(-1);
while (c.moveToNext()) {
Log.d("DEBUG",c.getLong(c.getColumnIndexOrThrow(Contacts.People._ID))
+":"+c.getString(c.getColumnIndexOrThrow
(Contacts.People.DISPLAY_NAME)));
}
--
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