Open alvindizon opened 5 months ago
I found a similar problem. The error is not in the button, but in the chat itself. The message presented is about internet connection, but that's not the case. I think it's just a generic error message.
The documentation is old and don't reflect current methods, being dificult to understand what is going on. Logcat presents these messages:
That's how screen looks like:
@valdenio what version of JivoSDK are you using? What did you write in Jivo.setData()?
@tavtorkin-jivo I've tried with versions 2.1.1, 2.2.1, 2.3.0 and 2.3.1. All of them give me the same result.
I'm calling setData only with widgetId: Jivo.setData("widgetId")
Try updating the app from version 2.2.1 to 2.3.2. When calling Jivo.setData("widgetId"), will be error: "There is something wrong, code = 500, error = End of input." If you open the chat, send button will be disabled. Only way to fix -clear app data.
Hi, following up on this issue? Is there an upcoming release that will fix this issue with disabled send button? v2.3.2 still encounters this problem.
Hi, we will definitely check and respond.
Hello Jivo team, looking at the code for setting the chat button to activated, it seems that ButtonState::isOnline
doesn't actually mean that there is an Internet connection, but rather if there are agents online--in JivoChatViewModel.kt, the ButtonState::isOnline
is set by AgentRepository::hasAgentsOnline
, see https://github.com/JivoChat/JivoSDK-Android/blob/164d35d865d1a652982c3c7fb845b76f1c34b33c/sdk/src/main/java/com/jivosite/sdk/ui/views/JivoChatButtonViewModel.kt#L26. In that case, should this be changed so that the chat button is still activated/enabled even if there are no agents available? Users should still be able to send chats so that their messages can be seen when agents are available. If this is intentional, then it should be documented--versions before 2.2 did not experience this behavior and it would be beneficial to inform developers that chat is disabled if the SDK detects that there are no agents online.
We have received multiple reports from Android 14/API 34 users of not being able to send chat messages. Specifically, they were reporting that the send button is disabled, even if their device still has an internet connection. We suspect that the changes introduced in version 2.2.2 caused this problem, specifically: https://github.com/JivoChat/JivoSDK-Android/blob/87141624c5a9038399fbd26b0c70c5bc58fdd2b9/sdk/src/main/java/com/jivosite/sdk/ui/views/JivoChatButton.kt#L47 This issue does not happen in version 2.1.1.