How do I navigate to the page from where chat is launched on pressing back key in Applozic Messenger?

Updated 3 months ago by Satadeep Biswas

The default action on pressing the back button from the chat screen, opens all conversation threads. It is also possible to bring users back to the page from where they initiated chat, when they hit the back button.

To enable this, you need to pass ConversationUIService.TAKE_ORDER parameter value as true, while launching chat.  

intent = new Intent(this, ConversationActivity.class);    
intent.putExtra(ConversationUIService.USER_ID, "");             
intent.putExtra(ConversationUIService.DISPLAY_NAME, "Devashish Mamgain");     //this is to display the title
intent.putExtra(ConversationUIService.TAKE_ORDER, true);

The code above shows how it should be configured. Configuring it accordingly will ensure that users return to the page from where they initiated on hitting the back button. 

How Did We Do?