views:

13

answers:

0

Hi! I am working on a contact import for Android 2.1. The following snippet is wokring:

Intent in=new Intent(Intent.ACTION_INSERT, ContactsContract.Contacts.CONTENT_URI);
in.putExtra(Insert.NAME, "Mark Maier");
in.putExtra(Insert.PHONE, "1234567");
in.putExtra(Insert.PHONE_TYPE, CommonDataKinds.Phone.TYPE_FAX_WORK);

startActivity(in);

The following parts are not working and I don't know why...

in.putExtra(Insert.COMPANY, "Google");
in.putExtra(Insert.COMPANY, CommonDataKinds.Organization.COMPANY);

and

in.putExtra(Insert.POSTAL, "MerckStr.");
in.putExtra(Insert.POSTAL_TYPE, CommonDataKinds.StructuredPostal.STREET);

or

in.putExtra(Insert.POSTAL_TYPE, CommonDataKinds.StructuredPostal.COUNTRY );
in.putExtra(CommonDataKinds.StructuredPostal.TYPE, CommonDataKinds.StructuredPostal.TYPE_WORK );
in.putExtra(CommonDataKinds.StructuredPostal.COUNTRY , "Deutschland");

I really would appreciate your help.

Cheers Toby