You are missing Contacts.Organizations.COMPANY

Title is for the title of the job

On Sep 16, 4:19 am, Dmitry Zelenetskiy <[email protected]> wrote:
> Hello!
>
> I am trying to add new contact using intent:
>
> Intent addPersonIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
> addPersonIntent.putExtra(Insert.NAME, "John Smith");
> addPersonIntent.setType(Contacts.People.DISPLAY_NAME);
>
> addPersonIntent.putExtra(Insert.PHONE, Uri.decode("806547850012"));
> addPersonIntent.putExtra(Insert.PHONE_TYPE,
> Contacts.Phones.TYPE_MOBILE);
> addPersonIntent.setType(Contacts.Phones.CONTENT_ITEM_TYPE);
>
> addPersonIntent.putExtra(Insert.PHONE, Uri.decode("+3(51)268012"));
> addPersonIntent.putExtra(Insert.PHONE_TYPE,
> Contacts.Phones.TYPE_WORK);
> addPersonIntent.setType(Contacts.Phones.CONTENT_ITEM_TYPE);
>
> addPersonIntent.putExtra(Insert.EMAIL, Uri.decode("[email protected]"));
> ddPersonIntent.putExtra(Insert.EMAIL_TYPE,
> Contacts.ContactMethodsColumns.TYPE_WORK);
> addPersonIntent.setType(Contacts.People.CONTENT_ITEM_TYPE);
>
> addPersonIntent.putExtra(Contacts.Organizations.TITLE, "Super
> company");
> addPersonIntent.putExtra(Contacts.Organizations.TYPE,
> Contacts.Organizations.TYPE_WORK);
> addPersonIntent.setType(Contacts.People.CONTENT_ITEM_TYPE);
>
> This code works but not adds several phones and company field doesn't
> initialize. What I do wrong?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
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