(Unknown) contact showing up after a modify

by Simon MacDonald » Thu, 13 Jan 2011 06:28:44 GMT

Sponsored Links
 Hi all,

I have a weird issue on an Android 2.2 device.  I have an existing
contact and I do a modify operation on it via:

ContentProviderOperation.Builder builder =
        .withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
        ContactsContract.Data.MIMETYPE + "=?",
        new String[]{id,

mApp.getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);

The contact gets modified correctly.  All of the new values show up
for the Contacts name.

However, if I look in my Contacts app there is a new contact called
"(Unknown)" that shows up after I do a modify.  I can insert as many
contacts as I want but every modify creates a new "(Unknown)" contact.

Anyone have any ideas?

Simon Mac Donald


Re: (Unknown) contact showing up after a modify

by Simon MacDonald » Thu, 13 Jan 2011 08:16:46 GMT

 Sorry all, there was a newInsert() as part of the larger function that
was causing this problem.

Simon Mac Donald

On Wed, Jan 12, 2011 at 5:28 PM, Simon MacDonald


Sponsored Links

Other Threads

1. Duplicate processes triggered from ongoing notification

I added a notification for an ongoing process, however when this is clicked
on it triggers a duplicate process and when you exit the duplicated process
the original copy is re-run by the operating system.

The app I'm working on doesn't use the main activity window, except to
trigger one of 2 other activities and this might be part of the problem
since I noticed the same issue in other applications like AndNav2.

My question is, how do I work round the issue to bring the running activity
to the front, rather than triggering a new activity, killing the first and
then the OS re-runs the first activity when the new one is quit?


2. fullscreen doesn't hide Status Bar in Android SDK 1.5 R2



by calling these
we can hide the title bar

Desu Vinod Kumar


3. contentobserber for my database

4. Socket timeout not working?

5. Localice Android applications and base system

6. Blogging Tool

7. Listeners cause unexpected stop??