Introducing a new way to guide your customers and provide real time support with Co-browsing

REVE Chat SDK for Android platform

REVE Chat has come up with live chat SDK for Android mobile apps. Integrate it with your mobile app to offer live chat assistance to customers. REVE Chat SDK seamlessly integrates and enables your support team to send and receive messages in your mobile application.

Getting started:

This tutorial shows you how to add this Android chat SDK and get started in a few minutes.

Necessary or minimum requirements:

  1. Android Studio
  2. Minimum SDK version should be 14 or above
  3. SDK version (Compile, Build, Target) should be 26 or above

The integration process:

To integrate live chat SDK with your Android mobile app, please follow the below mentioned steps:

Add the REVE Chat SDK url in your Project level build gradle file’s repositories section as shown below:

allprojects {
      repositories {
      ……
      maven {
         url "http://sdk.revechat.com:8081/artifactory/revechatsdk"
      }
   }
}

Step 2:

Add Design support library and REVE Chat Android SDK as dependency in your App level build.gradle file :

dependencies {
   …….
   implementation 'com.android.support:design:26.1.0'
   implementation 'io.pristine:libjingle:11139@aar'
   implementation('com.revesoft.revechatsdk:revechatsdk:1.0.9.0')
}

Note- You can also use Design support library greater then 26 also according to your project build sdk version.

Step 3:

Add following lines from where you want to start the chat.

//Initializing with account id
ReveChat.init("account id");
//Creating visitor info
VisitorInfo visitorInfo = new VisitorInfo.Builder()
.name("your name").email("your@email.com")
.phoneNumber("your number").build();
 
//Set visitor info
ReveChat.setVisitorInfo(visitorInfo);
 
//Optional
//If want to Receive push notification from Reve Chat.
//Add your device token id(registration Id)
//You also need to do step 4.
ReveChat.setDeviceTokenId("deviceTokenId");
 
//starting chat window
startActivity(new Intent(this, ReveChatActivity.class));

Step 4:

For receiving push notifications from REVE Chat, please follow the below mentioned steps:

– If the project has not implemented GCM or FCM, then implement it first.

  You can use the following:

//GCM implementation link

https://developers.google.com/cloud-messaging/android/client

//FCM implementation link

https://firebase.google.com/docs/cloud-messaging/

If you have put IP restriction in Google console/FCM project, then allow this IP –

<162.222.190.204>

– Provide Server Key in Agent’s Dashboard

In your notification Receiver service, if there is a key name “source” and its value is “revesdk”, then provide it to REVE Chat SDK as mentioned below:

If you have implemented GCM, then:

if (extras.containsKey("source") && extras.getString("source").equalsIgnoreCase("revesdk")){
    //Init sdk here again
    ReveChat.init("account id");
    VisitorInfo visitorInfo = new  VisitorInfo.Builder().name("your name").email("your@email.com").phoneNumber("yournumber").build();
    ReveChat.setVisitorInfo(visitorInfo);
    ReveChat.setDeviceTokenId("deviceTokenId");
    ReveChat.parseNotification(context, bundle);
}else{
    //rest of your push notification handling code
}

//If you have implemented FCM, then:

Map<String, String> data = remoteMessage.getData();
 if (data.containsKey("source") && data.getString("source").equalsIgnoreCase("revesdk"))
    //Init sdk here again
    ReveChat.init("account id");
    VisitorInfo visitorInfo = new VisitorInfo.Builder().name("your   name").email("you@email.com").phoneNumber("your number").build();
    ReveChat.setVisitorInfo(visitorInfo);
    ReveChat.setDeviceTokenId("deviceTokenId");
    ReveChat.parseNotification(context,data);       
}else{
     //rest of your push notification handling code
}

*Add an image resource named revechatsdk_notification_icon.png

Step 5:

Extra Customization (Optional)

Add primary and primary Dark in your color.xml, if already not defined:

<color name="revechatsdk_colorPrimary">#YourColor</color>
<color name="revechatsdk_colorPrimaryDark">#YourColorDark</color>

To change chat window’s content as per your need:

<color name="revechatsdk_color_chat_background">#e9e9e9</color>
<color name="revechatsdk_color_sending_msg">#b2dfea</color>
<color name="revechatsdk_color_receiving_msg">#ffffff</color>

//Chat action bar head text
<string name="revechatsdk_title_chat_window">CHAT WITH US</string>
//If the agents are offline, the action bar head text
<string name="revechatsdk_title_offline_window">Leave Us a Message</string>
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
Benefits
Best Practices
Branding
Conversions
Customer Experience
Customer Service
Customization
E-Commerce
Features
Financial Industry
Integration
Live Chat
Marketing
Mobile
Sales
Social Media
Travel
Tutorials
Website

Not sure what you are looking for? Check out some of our top features

Not sure how to get stated? Check our Support section or email us at support@revechat.com

close