I still don't understand why did it get associated with Facebook.
Even
if for some reason I had a wrong ID, it would more than likely get
associated with the wrong person in my contact list, but that was not
the case.
Also, when I go through the whole RawContact table, I don't see any
entry that
is associated with a Facebook account.  It seems that Facebook is
keeping their data
separate from the rest of the contact information.  Therefore, again
how could the
email addresses get associated with Facebook if Facebook doesn't use
the ContactsContact
tables for its data?

I do notice there are holes in the ID sequences in each
contactscontract table.  It
would be a huge coincidence that I used a wrong ID that was associated
with one of these
holes, somehow associated with Facebook (that I cannot see) and was
the right person as well.

Right now, I am very reluctant to continue with my testing on a real
device, without
knowing what happened and how I can avoid it happening again.  The
emulator does
not have these multiple account types and does not have the same
querks the
real device has. (e.g. Event dates are stored as readable strings on
the emulator "01/20/2011", whereas
on the real device event dates are stored as a string containing
milliseconds since 1/1/1970).

On Feb 25, 7:58 pm, Dmitri Plotnikov <[email protected]> wrote:
> I bet the id is wrong. Doublecheck that the id is in fact a raw contact id,
> not something else, like contact id.
> On Feb 24, 2011 9:05 PM, "FOV" <[email protected]> wrote:
>
>
>
> > 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- Hide quoted text -
>
> - Show quoted text -

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