ConnectyCube / android-messenger-app

Chat and voice / video calling app using ConnectyCube
https://connectycube.com
Apache License 2.0
51 stars 23 forks source link

How to send a list of chat messages from other screen than chat message screen #99

Closed ArnoldBrown closed 5 months ago

ArnoldBrown commented 2 years ago

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

ArnoldBrown commented 2 years ago

@masmerino 13

TatankaConCube commented 2 years ago

hi @ArnoldBrown, some notes about your code: 1) before call chatDialog.initForChat(chatService); you should login to the chat; 2) 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.

CubeRomanMagellan commented 5 months ago

no long-term activity