2017-03-16 23 views

回答

0

是的,我得到我的答案。

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; 
    } 
相關問題