/** * New message delivery status * * @param contact Contact * @param msgId Message ID * @param status Delivery status * @param date The server date for delivery status */ public void handleMessageDeliveryStatus(String contact, String msgId, String status, long date) { if (logger.isActivated()) { logger.debug("Handle message delivery status"); } // Notify listeners messagingApi.handleMessageDeliveryStatus(contact, msgId, status, date); }
/** * New ad-hoc group chat session invitation * * @param session Chat session */ public void handleAdhocGroupChatSessionInvitation(TerminatingAdhocGroupChatSession session) { if (logger.isActivated()) { logger.debug("Handle event receive ad-hoc group chat session invitation"); } // Broadcast the invitation messagingApi.receiveGroupChatInvitation(session); }
/** * New one-to-one chat session invitation * * @param session Chat session */ public void handleOneOneChatSessionInvitation(TerminatingOne2OneChatSession session) { if (logger.isActivated()) { logger.debug("Handle event receive 1-1 chat session invitation"); } // Broadcast the invitation messagingApi.receiveOneOneChatInvitation(session); }
/** * A new file transfer invitation has been received * * @param session File transfer session * @param isGroup is group file transfer */ public void handleFileTransferInvitation(FileSharingSession session, boolean isGroup) { if (logger.isActivated()) { logger.debug("Handle event file transfer invitation"); } // Broadcast the invitation messagingApi.receiveFileTransferInvitation(session, isGroup); }
/** * Store and Forward messages session invitation * * @param session Chat session */ public void handleStoreAndForwardMsgSessionInvitation( TerminatingStoreAndForwardMsgSession session) { if (logger.isActivated()) { logger.debug("Handle event S&F messages session invitation"); } // Broadcast the invitation messagingApi.receiveOneOneChatInvitation(session); }
/** * One-to-one chat session extended to a group chat session * * @param groupSession Group chat session * @param oneoneSession 1-1 chat session */ public void handleOneOneChatSessionExtended( GroupChatSession groupSession, OneOneChatSession oneoneSession) { if (logger.isActivated()) { logger.debug("Handle event 1-1 chat session extended"); } // Broadcast the event messagingApi.extendOneOneChatSession(groupSession, oneoneSession); }
/** * A new file transfer invitation has been received and creating a chat session * * @param session File transfer session * @param chatSession Group chat session */ public void handleGroupFileTransferInvitation( FileSharingSession session, TerminatingAdhocGroupChatSession chatSession) { if (logger.isActivated()) { logger.debug("Handle event file transfer invitation from an existing group chat session"); } // Broadcast the invitation messagingApi.receiveFileTransferInvitation(session, chatSession); }
/** * A new file transfer invitation has been received * * @param session File transfer session * @param chatSession Chat session */ public void handle1to1FileTransferInvitation( FileSharingSession session, OneOneChatSession chatSession) { if (logger.isActivated()) { logger.debug("Handle event file transfer invitation from an existing 1-1 chat session"); } // Broadcast the invitation messagingApi.receiveFileTransferInvitation(session, chatSession); }
/** * New file delivery status * * @param ftSessionId File transfer session ID * @param status Delivery status * @param contact contact who notified delivery */ public void handleFileDeliveryStatus(String ftSessionId, String status, String contact) { if (logger.isActivated()) { logger.debug( "Handle file delivery status: session=" + ftSessionId + " status=" + status + " contact=" + contact); } // Notify listeners messagingApi.handleFileDeliveryStatus(ftSessionId, status, contact); }
@Override public void onDestroy() { // Unregister account changed broadcast receiver if (accountChangedReceiver != null) { try { unregisterReceiver(accountChangedReceiver); } catch (IllegalArgumentException e) { // Nothing to do } } // Unregister SMS receiver for network initiated configuration if (reconfSMSReceiver != null) { try { reconfSMSReceiver.unregisterSmsProvisioningReceiver(); } catch (IllegalArgumentException e) { // Nothing to do } } // Close APIs imsApi.close(); termsApi.close(); presenceApi.close(); capabilityApi.close(); richcallApi.close(); ipcallApi.close(); messagingApi.close(); sipApi.close(); // Stop the core Thread t = new Thread() { /** Processing */ public void run() { stopCore(); } }; t.start(); }