public void dequeueGroupFileTransfer(String chatId,String fileTransferId,MmContent content,MmContent fileIcon) throws PayloadException, NetworkException, SessionNotEstablishedException {
  GroupChatSession groupChatSession=mImService.getGroupChatSession(chatId);
  if (groupChatSession == null) {
    mImService.rejoinGroupChatAsPartOfSendOperation(chatId);
  }
 else   if (groupChatSession.isMediaEstablished()) {
    long timestamp=System.currentTimeMillis();
    long timestampSent=timestamp;
    FileSharingSession session=mImService.createGroupFileTransferSession(fileTransferId,content,fileIcon,chatId,timestamp);
    GroupFileTransferImpl groupFileTransfer=getOrCreateGroupFileTransfer(chatId,fileTransferId);
    session.addListener(groupFileTransfer);
    setGroupFileTransferStateAndTimestamp(fileTransferId,chatId,State.INITIATING,timestamp,timestampSent);
    session.startSession();
  }
 else   if (groupChatSession.isInitiatedByRemote()) {
    if (sLogger.isActivated()) {
      sLogger.debug("Group chat session with chatId '" + chatId + "' is pending for acceptance, accept it.");
    }
    groupChatSession.acceptSession();
  }
 else {
    throw new SessionNotEstablishedException("The existing group chat session with chatId '" + chatId + "' is not established right now!");
  }
}

public void dequeueGroupFileTransfer ( String chatId , String fileTransferId , MmContent content , MmContent fileIcon ) throws PayloadException , NetworkException , SessionNotEstablishedException { GroupChatSession groupChatSession = mImService . getGroupChatSession ( chatId ) ; if ( groupChatSession == null ) { mImService . rejoinGroupChatAsPartOfSendOperation ( chatId ) ; } else if ( groupChatSession . isMediaEstablished ( ) ) { long timestamp = System . currentTimeMillis ( ) ; long timestampSent = timestamp ; FileSharingSession session = mImService . createGroupFileTransferSession ( fileTransferId , content , fileIcon , chatId , timestamp ) ; GroupFileTransferImpl groupFileTransfer = getOrCreateGroupFileTransfer ( chatId , fileTransferId ) ; session . addListener ( groupFileTransfer ) ; setGroupFileTransferStateAndTimestamp ( fileTransferId , chatId , State . INITIATING , timestamp , timestampSent ) ; session . startSession ( ) ; } else if ( groupChatSession . isInitiatedByRemote ( ) ) { if ( sLogger . isActivated ( ) ) { sLogger . debug ( "Group chat session with chatId '" + chatId + "' is pending for acceptance, accept it." ) ; } groupChatSession . acceptSession ( ) ; } else { throw new SessionNotEstablishedException ( "The existing group chat session with chatId '" + chatId + "' is not established right now!" ) ; } }
dequeue group file transfer
