crisp-im / crisp-sdk-android

:package: Crisp Android SDK, add a chat in any Android app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/android-sdk/
Other
55 stars 17 forks source link

Get session ID from SDK #125

Closed harry-sm closed 11 months ago

harry-sm commented 2 years ago

Hello, I'm not able to get the chat session id from the SDK. I want to use the session id with the the RTM API to get messages associated with that chat. Doing this allows me to push notifications even if the chat is not in the foreground.

Doc1faux commented 1 year ago

Hello @harry-sm and thank you for your feedback.

I've just seen this API is available in the Web Chatbox SDK. Currently it is not available on both native Android and iOS SDKs but I pass the information to the Crisp team if this can be added in a future SDK release :)

harry-sm commented 1 year ago

Hello @Doc1faux Ultimately an onagentmessage event like the JS SDK would be optimal.

harry-sm commented 1 year ago

@baptistejamin @Doc1faux Use case: The user is speaking with an agent in the app. The user leaves the chat screen and is on someone another screen I just want them to see an in-app message when the agent responds. So they can go back to the chat. that's it. An onagentmessage event would be perfect.

Doc1faux commented 11 months ago

Hi @harry-sm,

String Crisp.getSessionIdentifier(Context) public API has just been added to the new 1.0.15 release. Its usage is equivalent to the Web Chatbox SDK one.

baronha commented 5 months ago

Hi @harry-sm,

String Crisp.getSessionIdentifier(Context) public API has just been added to the new 1.0.15 release. Its usage is equivalent to the Web Chatbox SDK one.

I have a question? How do I know CrispChat SDK has finished loading so I can get the sessionId.

Doc1faux commented 5 months ago

Hi @baronha, Currently, Android SDK does not support event callbacks as the Web SDK does. However, it's clearly an area of improvements as it seems iOS SDK should support it too, but I did not found the registering method on the current 2.4.4 version. I'll discuss of it with the team if and when we could add it to our roadmap.

harry-sm commented 5 months ago

Hey @baronha and @Doc1faux

I agree that the callbacks from the Web SDK should be added to Android, IOS, and Flutter SDKs.

We weren't getting any in-app notifications with the mobile SDKs so we just added crisp via web view in our mobile app.