This documentation shows you how to embed REVE Chat Android SDK in an Android application and get started in a few minutes.
Getting Started with Android SDK
REVE Chat’s Android SDK can be seamlessly integrated with your mobile apps and enable your team deliver in-app messaging to your app users for better engagement and customer support.
Minimum Requirements
Android Studio
Minimum SDK version should be 14 or above
SDK version (Compile, Build, Target) should be 26 or above
Android SDK Integration Process
Step 1
To integrate Android SDK with your mobile app, please follow the below mentioned steps:
Add the Android SDK URL in your Project level build gradle file’s repositories section as shown below:
If android studio version less than Android Studio Arctic Fox
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. However, this step needs to be done differently for JAVA or KOTLIN in separate ways.
Code for JAVA
//Initializing with account id
ReveChat.init("account id");
LoginState loginState = LoginState.LOGGED_OUT;
boolean doNotShowPreChatForm = true;
/**
* if application don't need to show pre-chat form then need to set as
* loginState = LoginState.LOGGED_IN
*/
if (doNotShowPreChatForm)
loginState = LoginState.LOGGED_IN;
//Creating visitor info
VisitorInfo visitorInfo = new VisitorInfo.Builder()
.name("your name")
.email("your@email.com")
.phoneNumber("your number")
.appLoginState(loginState)
.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));
Code for KOTLIN
//Initializing with account id
ReveChat.init("account id")
var loginState : LoginState = LoginState.LOGGED_OUT
var doNotShowPreChatForm = true
/**
* if application don't need to show pre-chat form then need to set as
* loginState = LoginState.LOGGED_IN
*/
if (doNotShowPreChatForm)
loginState = LoginState.LOGGED_IN
//Creating visitor info
val visitorInfo: VisitorInfo = VisitorInfo.Builder()
.name("your name")
.email("your@email.com")
.phoneNumber("your number")
.appLoginState(loginState)
.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(Intent(this, ReveChatActivity::class.java))