Wednesday, November 20, 2013

[android-developers] Modify SipAddress Programmatically

I need to add/modify SipAddress programmatically, I understood how to update the email address, but not able to decipher the mechanism to update/add the SipAddress.

I am using this code:

            ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
                    .withValue(Data.RAW_CONTACT_ID, mRawContactId)
                    .withValue(Data.MIMETYPE, SipAddress.CONTENT_ITEM_TYPE)
                    .withValue(Data.DATA1, "sip:XYZ@sip.com")
                    .withValue(SipAddress.TYPE, SipAddress.TYPE_HOME)
                    .withValue(SipAddress.DISPLAY_NAME, "XYZ")
                    .build());
            getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);

Any links or pointers will do greats for me. I have been stuck in this for a week now. I have gone through the Android Dev Contact Documentation, but its not that helpful.

--
Regards
Harsh Vardhan

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate