Ejemplo n.º 1
0
 @Override
 public void onJoinedRoom(QBChatRoom pRoom) {
   chatRoom = pRoom;
   chatRoom.addMessageListener(app.getMsgManager());
   chatRoom.addParticipantListener(pParticipantListener);
   app.setJoinedRoom(chatRoom);
   pRoom.setmRoomReceivingListener(null);
 }
Ejemplo n.º 2
0
 @Override
 public void release() {
   app.getMsgManager().downloadPersistentRoom();
   if (chatRoom != null) {
     chatRoom.removeMessageListener(app.getMsgManager());
     chatRoom.leave();
     app.setJoinedRoom(null);
   }
 }
Ejemplo n.º 3
0
 public void sendMessage(String pMessage, boolean pIsDelivered, boolean pIsComposed) {
   try {
     if (chatRoom != null) {
       chatRoom.sendMessage(pMessage, pIsDelivered, pIsComposed);
     } else {
       Toast.makeText(mChat.getContext(), R.string.room_join_fall, Toast.LENGTH_LONG).show();
     }
   } catch (XMPPException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 4
0
 @Override
 public void onCreatedRoom(QBChatRoom pRoom) {
   pRoom.setmRoomReceivingListener(null);
 }