0
如何將註釋添加到組。如何添加/更改聯繫人組註釋
我嘗試
ContentValues contentValues = new ContentValues();
contentValues.put(Groups.NOTES, note);
如何將註釋添加到組。如何添加/更改聯繫人組註釋
我嘗試
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;
}