Closed rhydiant closed 2 years ago
Hello @rhydiant !
Apologies for late response. You are right. Configuration isn't reflected in the chat form after clearing the session. I will fix that as soon as I can.
For now however, I was able to find another workaround that could suit you more than using ChatWindowActivity
.
You could remove the view added by ChatWindowView.createAndAttachChatWindowInstance(getActivity());
like so:
public static void detachChatWindowInstance(@NonNull Activity activity, @NonNull ChatWindowView view) {
final ViewGroup contentView = (ViewGroup) activity.getWindow().getDecorView().findViewById(android.R.id.content);
contentView.removeView(view);
}
and then create and attach ChatWindowView
as you did before with new configuration.
Sorry for the inconvenience and thank you for reporting this!
Hey @rhydiant
There is new version brewing that should help to solve your issue in a more convenient way. No, you can fully reload your chat window when your configuration changes. Check 2.2.0rc1 . This version also should make things more readable and cleaner. So if you decide to use that version, you might need to do really small changes in your code: migration guide
Following these integration instructions - https://developers.livechat.com/docs/getting-started/installing-livechat/android-widget/#full-screen-window
Calling
setUpWindow(configuration)
will not update the users name or email address. This is an issue when switching users in our app, as the previous user details are used in chats. CallingChatWindowView.clearSession(Context)
doesn't resolve the issue either.As a workaround, we are using
ChatWindowActivity
which doesn't provide the same capabilities we need (to detect when chat messages are received when the chat window is closed).Using Android LiveChat SDK v2.1.5.