public boolean handleGroupNotification(String notification) {
   GroupMessageDB db = GroupMessageDB.getInstance();
   IMessage.GroupNotification groupNotification = IMessage.newGroupNotification(notification);
   IMessage imsg = new IMessage();
   imsg.sender = 0;
   imsg.receiver = groupNotification.groupID;
   imsg.timestamp = groupNotification.timestamp;
   imsg.setContent(groupNotification);
   return db.insertMessage(imsg, groupNotification.groupID);
 }
 public boolean handleMessage(IMMessage msg) {
   GroupMessageDB db = GroupMessageDB.getInstance();
   IMessage imsg = new IMessage();
   imsg.sender = msg.sender;
   imsg.receiver = msg.receiver;
   imsg.timestamp = msg.timestamp;
   imsg.setContent(msg.content);
   boolean r = db.insertMessage(imsg, imsg.receiver);
   msg.msgLocalID = imsg.msgLocalID;
   return r;
 }