I'm making my application compatible with Android 1.5 (APLI level 3) from 2.3.3. The only thing I have to change (according to the compiler) is the code used to add a contact in the phonebook. The code for 2.3.3 is the following:
Intent intent = new Intent(Intent.ACTION_INSERT);
intent.setType(ContactsContract.Contacts.CONTENT_TYPE);
intent.putExtra(ContactsContract.Intents.Insert.NAME, "Name");
intent.putExtra(ContactsContract.Intents.Insert.EMAIL, "Email");
intent.putExtra(ContactsContract.Intents.Insert.PHONE, "phone");
int PICK_CONTACT = 100;
startActivityForResult(intent, PICK_CONTACT);
The problem with 1.5 is that ContactsContract is not recognized. How can I convert this code for 1.5?
Regards.