crisp-sdk-android icon indicating copy to clipboard operation
crisp-sdk-android copied to clipboard

Get session ID from SDK

Open harry-sm opened this issue 3 years ago • 3 comments
trafficstars

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.

harry-sm avatar Jun 24 '22 17:06 harry-sm

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 :)

Doc1faux avatar Jul 18 '22 12:07 Doc1faux

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

harry-sm avatar Oct 25 '22 20:10 harry-sm

@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.

harry-sm avatar Oct 25 '22 21:10 harry-sm

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.

Doc1faux avatar Jul 25 '23 15:07 Doc1faux

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.

baronha avatar Jan 25 '24 11:01 baronha

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.

Doc1faux avatar Jan 25 '24 11:01 Doc1faux

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.

harry-sm avatar Jan 26 '24 08:01 harry-sm