Hi all (sorry in advance for my bad english...) I'm working on a simple app that allows users to add new contacts and delete existing ones.
For deleting, I have no problems, but for adding a new contact I always get "UnsupportedOperationException: Unknown Uri: content://com.android.contacts/data/phones" Here is the code I wrote: --------------------------------------------------------------------- //for adding a new contact --> this launch the "UnsupportedOperationsExc..." ContentValues cvMap=new ContentValues(); cvMap.put(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, "fake_name"); cvMap.put(ContactsContract.CommonDataKinds.Phone.NUMBER, "000111"); contentResolver.insert(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, cvMap); ------------------------------------------------------------------ //for deleting an existing contact --> this works perfectly Uri instanceUri=Uri.withAppendedPath(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, String.valueOf(rowId)); contentResolver.delete(instanceUri, null, null); --------------------------------------------------------------------- I have also put the necessary permissions in the Manifest (for reading and writing). So, what can be? -- 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

