I have been writing a program that would update my contact information
from information I already have in Outlook.  I have been writing this
for andriod 2.1 since I have a Motorola Backflip updated to 2.1.  I
performed an insert using the following code;

ContentValues values = new ContentValues();
values.put(ContactsContract.Data.RAW_CONTACT_ID, id);
values.put(ContactsContract.Data.MIMETYPE,
           ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
values.put(ContactsContract.CommonDataKinds.Email.DATA,
           EmailAddresses[i]);
values.put(ContactsContract.CommonDataKinds.Email.TYPE,
        ContactsContract.CommonDataKinds.Email.TYPE_CUSTOM);
values.put(ContactsContract.CommonDataKinds.Email.LABEL,
        "Outlook " + Integer.toString(i+1));
if (doWrite) {
        Uri phoneUri =
getContentResolver().insert(ContactsContract.Data.CONTENT_URI,
        values);
}

After running my code the proper contact's info was updated with the
correct email address, and the type was that of "Outlook x" due to the
having a type of CUSTOM. This is all seen well when looking at
contacts on the cell phone.
But, when I look through ContactsContract.Data it doesn't exit.  When
I try to edit this info via the cell phone's edit, it says it's locked
and is associated with Facebook.   What gives?  Why should this insert
get associated with Facebook.  I don't see any facebook data nor any
facebook contacts when I look at RawContact entries.

-- 
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

Reply via email to