Product Guide
APIsProductUpdatesPricingFAQs
  • Introduction to REVE Chat
  • Integrations
    • Website
    • Social Media Channels
      • WhatsApp
      • Instagram Messaging and Comment
      • Facebook Messenger and Comment
      • Viber
      • Telegram
    • Direct Chat Page
    • Mobile SDK
      • Native Android SDK
      • Native iOS SDK
      • Flutter Android SDK
      • Flutter iOS SDK
      • React Native iOS SDK
      • React Native Android SDK
    • Email Integration
      • Forward emails to your REVE Chat tickets
      • Integrate Your Business Email
        • Connecting Gmail with POP/IMAP Settings
    • All Integrations
      • CRM Integrations
        • Pipedrive
        • Salesforce
        • HubSpot
        • MS Dynamics
        • Amo CRM
        • Agile CRM
        • Vtiger
        • Capsule
        • Infusionsoft (by Keap)
      • CMS Integration
        • WordPress
        • DotNet Nuke
        • Blogger
        • Joomla
        • Drupal
        • ModX
      • E-commerce
        • Shopify
        • Bigcommerce
        • WooCommerce
        • Prestashop
        • 3dCart
        • Pinnacle Cart
        • Corecommerce
        • BigCartel
        • ECWID
        • LemonStand
        • Ebay
        • Volusion
        • Americommerce
        • osCommerce
        • Magento
          • By Manual Code Injection
        • Zencart
        • XCart
        • OpenCart (V4.0.x)
          • OpenCart (Old Version Integration)
        • CSCart
        • Abantecart
      • Website Builder
        • Wix
      • Hosting Platform
        • Plesk
        • WHMCS
      • Analytics
        • Google Tag Manager
        • Google Analytics
    • Google Integration
      • YouTube Integration
      • Google Play Store
      • Google Business Account
  • Appstore
  • Inbox
    • Breaking Down of Single Inbox
    • Folders of Single Inbox
    • How Conversation Works!
    • Chat Monitoring for All Ongoing Agents' Chat
    • Chat History for All Closed Conversations
    • Proactive Chat Management
    • Voice & Video Call
    • Co-Browsing
    • How to use Shortcuts
    • Inbox Appearance
  • Contacts
    • Manage Your Contacts
    • Segments
  • WhatsApp Campaign
    • What is WhatsApp Campaign?
      • Broadcast: Send Campaigns
      • Templates: Create Campaign
  • Tickets
    • Set up your Ticketing email
    • Create Ticket
      • Create a ticket manually
      • Ticket from Chat History
      • Automated & Bulk Ticket Creation
    • Knowing your Ticketing tables
      • Custom Ticketing Tables
    • Managing a Ticket
  • Chatbot
    • Bot Builder
      • Response Elements
        • Text Action
        • Quick Reply Action
        • Carousel Action
        • Button Action
        • Send Email
      • Data Collection
        • Ask Name
        • Ask Phone
        • Ask Email
        • Ask Question
        • Ask OTP
        • Ask File
        • Ask Date
        • Ask Time
        • Forms
        • Ask Number
      • Media
        • Image Action
        • Audio Action
        • Video Action
        • File Action
      • Workflow Action
        • Condition Action
        • Chat Transfer Action
        • Close Chat
        • Appointment Action
        • Attribute Action
        • Business Hour
        • System Attributes
      • Advanced Action
        • Salesforce Bot Action Manual
        • API Connector
        • Goal
        • Dynamic Data
    • Brain AI
      • ChatGPT Integration
    • Settings
      • Bot Profile
      • General Settings
      • Webhook
    • Training
      • Intent Sample
      • Sentiment
      • Synonyms
      • FAQ
      • Untrained
      • Trained
      • Bulk Training
    • Multilingual Bot
  • Reports
    • Summary
    • Chat Satisfaction
    • Chatbot Report
      • Bot Engagement
      • Flow Engagement
      • Goal Analysis
    • Agent Analytics
      • Agent Activity
      • Agent Performance
      • Metrics
      • SLA Breach Analysis
    • Ticket Analytics
      • Dashboard
      • Metrics
    • Visitor Analytics
    • Enterprise Report
      • Daily Agent Performance
      • Hourly Agent Performance
      • Daily Group Performance
      • Traffic Analysis Report
      • First Response Time
  • User Profile
    • Billing
    • Help & Feedback
  • Settings
    • General Settings
      • Auto Triggers
      • Forms
        • Pre Chat Form
        • Post Chat Form
        • Custom Forms
          • Advanced Forms
        • Ticket Forms
      • Canned Responses
      • Custom Attributes
      • Call Recording
      • Tags
      • Appointment
      • Departments
      • Chat Transcript Forwarding
      • Ban Visitor
      • Trusted IP & Domain
      • Business Hour
    • Chat Widgets
      • Appearance
      • Custom Message
      • Widget Features
      • Forms
      • Code Snippet & Quick Share
    • Ticketing
      • Email Templates
      • Status Management
    • Agent Management
      • Agents
      • Departments
      • Role Management
    • API Settings
      • Json Parse Format
    • Scripts
    • SLA Policy
    • Routing Policy in REVE Chat
      • Chat Routing
      • Advanced Routing
    • Other Settings
Powered by GitBook
On this page
  • Getting Started with React Native Android SDK
  • Introduction
  • Android SDK integration process

Was this helpful?

  1. Integrations
  2. Mobile SDK

React Native Android SDK

This documentation shows you how to embed REVE Chat React Native Android SDK in an Android application and get started in a few minutes.

PreviousReact Native iOS SDKNextEmail Integration

Last updated 4 months ago

Was this helpful?

Getting Started with React Native Android SDK

REVE Chat’s React Native 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.

Introduction

This documentation shows you how to embed REVE in an Android application 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

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

In app build.gradle, you can add the repositories

allprojects {
    repositories {
        jcenter()
        …
        maven { url 'https://jitpack.io' }
        maven { url 'https://maven.google.com/' }
        maven {
            url "https://maven.iptelephony.revesoft.com/artifactory/libs-release-local/"
        }
        maven {
            url 'https://jfrog-artifact.revechat.com/artifactory/artifactory/'
        }
    }
}

Otherwise

In settings.gradle, you can add the repositories

dependencyResolutionManagement {                   
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        …
        jcenter()
        maven { url 'https://jitpack.io' }
        maven { url 'https://maven.google.com/' }
        maven {
            url "https://maven.iptelephony.revesoft.com/artifactory/libs-release-local/"
        }
        maven {
            url 'https://jfrog-artifact.revechat.com/artifactory/artifactory/'
        }
    }
}

Step 2

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

dependencies {
    …
    implementation('com.revesoft.revechatsdk:revechatsdk:3.1.3')

}

Note- You can also use Design support library greater then 26 also according to your project build SDK version. Use the latest version of our native android SDK.

Step 3

Add following lines from to communicate from react-native javascript code with REVE Chat SDK. However, this step needs to be done differently for JAVA or KOTLIN in separate ways.

Code for JAVA

package com.your_package_name;

import android.content.Intent;
import android.util.Log;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.revesoft.revechatsdk.model.VisitorInfo;
import com.revesoft.revechatsdk.ui.activity.ReveChatActivity;
import com.revesoft.revechatsdk.utils.ReveChat;

/**
 * Native Module to communicate from react-native javascript code
 * with REVEChat SDK 
 */
public class REVEChatSDKModule extends ReactContextBaseJavaModule {

    REVEChatSDKModule(ReactApplicationContext context) {
        super(context);
    }

    @Override
    public String getName() {
        return "REVEChatSDKModule";
    }

    @ReactMethod
    public void startChat(String accountId, String userName, String userEmail, String userPhoneNumber) {
        Log.i("REVEChatSDKModule", "startChat: accountId " + accountId + " userName: " + userName+ " userEmail "+userEmail+" userPhoneNumber "+userPhoneNumber);

        //Initializing with account id
        ReveChat.init(accountId);

        //creating visitor info
        VisitorInfo visitorInfo = new VisitorInfo.Builder()
                .name(userName)
                .email(userEmail)
                .phoneNumber(userPhoneNumber).build();

        //set visitor info
        ReveChat.setVisitorInfo(visitorInfo);
        
        Intent intent = new Intent(getReactApplicationContext(), ReveChatActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        getReactApplicationContext().startActivity(intent);
    }

}

Code for KOTLIN

package [your_package_name]

import android.content.Intent
import android.util.Log
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import com.revesoft.revechatsdk.model.VisitorInfo
import com.revesoft.revechatsdk.ui.activity.ReveChatActivity
import com.revesoft.revechatsdk.utils.ReveChat

/**
 * Native Module to communicate from react-native javascript code
 * with REVEChat SDK 
 */
class REVEChatSDKModule internal constructor(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
    override fun getName(): String {
        return "REVEChatSDKModule"
    }

    @ReactMethod
    fun startChat(accountId: String, userName: String, userEmail: String, userPhoneNumber: String) {
            Log.i(
                "REVEChatSDKModule",
                "startChat: accountId $accountId userName: $userName userEmail $userEmail userPhoneNumber $userPhoneNumber"
            )
             
             //Initializing with account id
             ReveChat.init(accountId)
             var loginState : LoginState = LoginState.LOGGED_IN
     
             //creating visitor info
             val visitorInfo: VisitorInfo = VisitorInfo.Builder()
                 .name(userName)
                 .email(userEmail)
                 .phoneNumber(userPhoneNumber)
                 .appLoginState(loginState)
                 .build()

             //set visitor info
             ReveChat.setVisitorInfo(visitorInfo)
             val intent = Intent(reactApplicationContext, ReveChatActivity::class.java)
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
             reactApplicationContext.startActivity(intent)
        
             reactApplicationContext.startService(Intent(reactApplicationContext., REVEChatApiService::class.java))
         }
     }

Step 4

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

Code for Javascript

// React Native Sample Code

import {
  NativeModules
} from 'react-native';

const {REVEChatSDKModule} = NativeModules;

<Button
        title="Chat With Us"
        onPress={() =>
			{ 

				REVEChatSDKModule.startChat('[account_id]', '[user_name]', '[user@email]', 'user_phone_number');
			}
		}
/>

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:

<!--  screen background color --> 
<color name="revechatsdk_layout_bg">#YourColor</color>
    
<!--  Button color --> 
<color name="revechatsdk_btn_text">#YourColor</color>
<color name="revechatsdk_btn_bg">@color/revechatsdk_colorPrimary</color>
    
<!-- Chat screen colors --> 
<color name="revechatsdk_color_chat_background">#YourColor</color>
<color name="revechatsdk_color_sending_msg_bg">#YourColor</color>
<color name="revechatsdk_color_receiving_msg_bg">#YourColor</color>
<color name="revechatsdk_shape_date_bubble_bg">#YourColor</color>

<!-- Chat action bar head text
<string name="revechatsdk_title_chat_window">YOUR MESSAGE TITLE</string>

Any questions? Please email us at or .

Chat Android SDK
issue.support@revechat.com
scan to chat with us