chat-sdk / chat-sdk-android

Chat SDK Android - Open Source Mobile Messenger
https://chatsdk.co
Other
1.61k stars 611 forks source link

I want to open ChatActivity and when back button pressed I want to go back my application activity #712

Closed MuhammadSulaiman001 closed 3 years ago

MuhammadSulaiman001 commented 3 years ago

I am creating a thread and then calling startChatActivityByID(context, thread.EntityId) to open a chat activity between two users.

When the user presses the back button it goes back to ChatSdk main activity.. I want to get back to my activity (caller of startChatActivityByID)..

I mean, I want only to use ChatActivity in my application to allow two users to chat with each other... Could you please help me with this? Thanks in advance.

MuhammadSulaiman001 commented 3 years ago

Ok got it, ChatSDK.ui().setMainActivity(YourMainActivity.class) Solves it, where YourMainActivity is the caller activity (my activity)