android-messenger-app
android-messenger-app copied to clipboard
How to send a list of chat messages from other screen than chat message screen
How to send a list of chat messages to different recipient that are stored at the time of device in offline. Need to send the stored list of message once the device become online
I tried the send functionality from Recent Chat page
ConnectycubeChatService chatService = ConnectycubeChatService.getInstance();
ConnectycubeChatDialog chatDialog = new ConnectycubeChatDialog(dialog_id);
chatDialog.initForChat(chatService); <<----Logout pointed
ConnectycubeChatMessage chatMessage = new ConnectycubeChatMessage();
chatMessage.setRecipientId(user_id);
chatMessage.setBody(chat_msg);
chatMessage.setSaveToHistory(true);
chatDialog.sendMessage(chatMessage);
Facing issue -
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
@masmerino 13
hi @ArnoldBrown, some notes about your code:
- before call
chatDialog.initForChat(chatService);
you should login to the chat; - here
ConnectycubeChatDialog chatDialog = new ConnectycubeChatDialog(dialog_id);
need to set the dialog's type and occupants ids;
Please provide the full log without any filtering and cutting from starting that app till getting this issue.
no long-term activity