anyone helpe? On Jul 13, 2:29 pm, Alvin <[email protected]> wrote: > here's a few things i couldn't figure out and could find anyone else > posting them in the discussion: > 1. > In the new API > ContactsContract.AggregationExceptions table does not really work for > me: when I try to insert a row into the table, it gives me this error: > > 07-13 14:20:09.399: ERROR/XXXXX(3074): > java.lang.UnsupportedOperationException: URI: > content://com.android.contacts/aggregation_exceptions, calling > user: ............ > my code here: > > ContentValues values = new ContentValues(); > values.put(AggregationExceptions.RAW_CONTACT_ID1, > String.valueOf(oldRawContactId)); > values.put(AggregationExceptions.RAW_CONTACT_ID2, > String.valueOf(newRawContactId)); > values.put(AggregationExceptions.TYPE, > AggregationExceptions.TYPE_KEEP_TOGETHER); > mContentResolver.insert(AggregationExceptions.CONTENT_URI, values); > > and I'm sure the two raw contact id exists. > > 2. > in the old API: > when I create a group in Contact book, the name of the group is not > shown(or not shown correctly) > here's the code: > > ContentValues values = new ContentValues(); > values.put(Contacts.Groups.SHOULD_SYNC, 1); > values.put(Contacts.Groups.SYSTEM_ID, mGroupID); > values.put(Contacts.Groups.NAME, mGroupTitle); > mContentResolver.insert(Contacts.Groups.CONTENT_URI, values); > > 3. > in the old API: > when I insert a custom IM contact method for a contact, the data is > inserted and shown correctly, but user cannot edit the contact using > the default contact app any more. If I remove the contact method, user > can edit the contact again. > here's the code for inserting the contact method: > > ContentValues values = new ContentValues(); > values.put(ContactMethods.PERSON_ID, newContactId); > values.put(ContactMethods.KIND, Contacts.KIND_IM); > values.put(ContactMethods.TYPE, ContactMethods.TYPE_CUSTOM); > values.put(ContactMethods.AUX_DATA, > ContactMethods.encodeCustomImProtocol(MYIM_PROTOCOL)); > values.put(ContactMethods.DATA, buddyId); > values.put(ContactMethods.ISPRIMARY, 0); > values.put(ContactMethods.LABEL, IM_LABEL); > > mContentResolver.insert(ContactMethods.CONTENT_URI, values);
-- 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

