|
|
|
For starting a chat you can just open the Reve SaaS Dashboard and from chat page, you can create and start chat or from contact page you can start a single chat.
|
|
|
|
|
|
|
|
But if you want to start chat directly to a subscriber or group from your app, you need to use the following apis.
|
|
|
|
|
|
|
|
**1. Opening a single chat :**
|
|
|
|
|
|
|
|
This will directly launch the chat window with the user. You do not need to create chat with single user if not created before. With the first message send, the chat will be created autometically.
|
|
|
|
|
|
|
|
`ReveSaaS.openSingleChat(activity, numberToChatWithCountryCode);`
|
|
|
|
|
|
|
|
*Example*
|
|
|
|
|
|
|
|
` ReveSaaS.openSingleChat(MainActivity.this, "+8801844097722");`
|
|
|
|
|
|
|
|
**2. Creating a single chat :**
|
|
|
|
|
|
|
|
This will allow to choose a user and start chat with him.
|
|
|
|
|
|
|
|
`ReveSaaS.createSingleChat(activity);`
|
|
|
|
|
|
|
|
*Example*
|
|
|
|
|
|
|
|
` ReveSaaS.createSingleChat(MainActivity.this);`
|
|
|
|
|
|
|
|
|
|
|
|
**3. Opening a group chat :**
|
|
|
|
|
|
|
|
This will allow to choose multiple user and start group chat with them.
|
|
|
|
|
|
|
|
`ReveSaaS.createGroupChat(activity);`
|
|
|
|
|
|
|
|
*Example*
|
|
|
|
|
|
|
|
` ReveSaaS.createGroupChat(MainActivity.this);`
|
|
|
|
|
|
|
|
**4. Opening a group chat :**
|
|
|
|
|
|
|
|
This will allow to launch e pre-created group chat directly. But for that you need to provide the groupId.
|
|
|
|
|
|
|
|
`ReveSaaS.openGroupChat(activity,groupId);`
|
|
|
|
|
|
|
|
*Example*
|
|
|
|
|
|
|
|
` ReveSaaS.createGroupChat(MainActivity.this,"22014");`
|
|
|
|
|