Android 如何添加/更改联系人组备注
如何向组中添加注释 我试试看Android 如何添加/更改联系人组备注,android,contacts,Android,Contacts,如何向组中添加注释 我试试看 ContentValues contentValues = new ContentValues(); contentValues.put(Groups.NOTES, note); 是的,我得到了答案 public static boolean setGroupNote(String groupId, String note) { try { if (groupId == nu
ContentValues contentValues = new ContentValues();
contentValues.put(Groups.NOTES, note);
是的,我得到了答案
public static boolean setGroupNote(String groupId, String note)
{
try
{
if (groupId == null || note == null)
return false;
String where = Groups._ID + " = ?";
String[] args = {groupId};
ContentValues contentValues = new ContentValues();
contentValues.put(Groups.NOTES, note);
int u = getContentResolver.update(Groups.CONTENT_URI, contentValues, where, args);
if(u != 0)
return true;
}
catch (Exception e) {}
return false;
}