Uri name=null;
String []whereargs={"Sameer Ahmad"};
name=Uri.withAppendedPath(People.CONTENT_URI,People.Phones.CONTENT_DIRECTORY);
cv1.put(People.NAME,"Tofeeq Ahma开发者_如何学God");
int i1=0;
i1=getContentResolver().update(name,cv1,"name=?",whereargs);
}
catch(Exception e){
e.getMessage();
I am trying to update a phone numder by URi but its showing the Exception:Cannot Update//Contacts/people/phone.
Same error in inserting.
- I want to create shared data base which will be accessible from every application
have you declared the necessary permission in your manifest?
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
精彩评论