{"id":273333,"date":"2025-09-03T04:19:23","date_gmt":"2025-09-03T04:19:23","guid":{"rendered":"https:\/\/www.revechat.com\/?post_type=help-center&#038;p=273333"},"modified":"2026-04-29T06:47:11","modified_gmt":"2026-04-29T06:47:11","slug":"native-android-sdk","status":"publish","type":"help-center","link":"https:\/\/www.revechat.com\/help-center\/native-android-sdk\/","title":{"rendered":"Native Android SDK"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>REVE Chat\u2019s Android SDK can be seamlessly integrated with your mobile apps and enable your team to deliver in-app messaging to your app users for better engagement and customer support. This documentation shows you how to embed REVE Chat Android SDK in an Android application and get started in a few minutes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Minimum Requirements<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Android Studio<\/li>\n\n\n\n<li>Minimum SDK version should be 24 or above<\/li>\n\n\n\n<li>SDK Version: 3.3.8<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Android SDK Integration Process<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1<\/h3>\n\n\n\n<p>To integrate Android SDK with your mobile app, please follow the below mentioned steps. Based on gradle version follow either steps in (a) or (b)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If gradle version is ( 7.X to 8.0 ) , add following repositories in project gradle file ( build.gradle ). <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">allprojects {\n    repositories {\n        jcenter()\n        maven { url &#039;https:\/\/maven.google.com&#039; }\n        mavenLocal()\n        google()\n        maven {\n            url &quot;https:\/\/maven.iptelephony.revesoft.com\/artifactory\/libs-release-local\/&quot;\n        }\n        maven {\/\/ for revesoft cpp\n            url &quot;https:\/\/jfrog-artifact.revechat.com\/artifactory\/artifactory\/&quot;\n        }\n        maven { url &quot;https:\/\/jitpack.io&quot; }\n    }\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If gradle version is 8.X to latest, add following repositories in settings.gradle<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">dependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url &#039;https:\/\/jitpack.io&#039; }\n        maven { url &#039;https:\/\/maven.google.com\/&#039; }\n        maven {\n            url &quot;https:\/\/jfrog-artifact.revechat.com\/artifactory\/artifactory\/&quot;\n        }\n        maven {\n            url &quot;https:\/\/maven.iptelephony.revesoft.com\/artifactory\/libs-release-local\/&quot;\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2<\/h3>\n\n\n\n<p>Add Design support library and REVE Chat Android SDK as dependency in your App level build.gradle file :<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\u2026\nbuildFeatures {\n       dataBinding  true\n       viewBinding true\n       buildConfig = true\n   }\n\n\ndependencies {\n   implementation(&#039;com.revesoft.revechatsdk:revechatsdk:3.3.8&#039;)\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3<\/h3>\n\n\n\n<p>Add following following method in your Main Activity and call this from onCreate() method. <strong><em>Code for JAVA<\/em><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-java\">private void initiateReveChat() {\n    \/\/ Initializing with account id\n    ReveChat.init(accountId);\n\n    \/\/ Create visitor info\n    VisitorInfo visitorInfo = new VisitorInfo.Builder()\n            .name(userName) \/\/ set name\n            .email(userEmail)\n            .phoneNumber(userPhone)\n            .build();\n\n    \/\/ visitorInfo.setAccessToken(accessToken); \/\/ set access token if any\n\n    ReveChat.setVisitorInfo(visitorInfo);\n\n    ReveChat.setAppBundleName(BuildConfig.APPLICATION_ID);\n    ReveChat.setAppVersionNumber(BuildConfig.VERSION_NAME);\n    \n\n    ReveChat.setApiServiceTitle(&quot;REVEChatApiService&quot;);  \/\/ change as per your requirement\n    ReveChat.setApiServiceContent(&quot;REVEChatApiService&quot;); \/\/ change as per your requirement\n\n    ReveChat.setIsScreenShotEnabled(false);   \/\/ to disable taking screenshot \n    \n    Intent intent = new Intent(this, REVEChatApiService.class);\n    startService(intent);\n}\n<\/code><\/pre>\n\n\n\n<p><strong><em>Code for KOTLIN<\/em><\/strong>: <\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">private fun initiateReveChat() {\n        ReveChat.init(accountId)\n\n        \/\/create visitor info\n        val visitorInfo: VisitorInfo = VisitorInfo.Builder()\n            .name(userName) \/\/ set name\n            .email(userEmail)\n            .phoneNumber(userPhone)\n            .build()\n\n\n        ReveChat.setVisitorInfo(visitorInfo)\n\n        ReveChat.setAppBundleName(BuildConfig.APPLICATION_ID)\n        ReveChat.setAppVersionNumber(BuildConfig.VERSION_NAME)\n        \n        ReveChat.setApiServiceTitle(&quot;REVEChatApiService&quot;)  \/\/ change as per your requirement\n        ReveChat.setApiServiceContent(&quot;REVEChatApiService&quot;) \/\/ change as per your requirement\n\n        ReveChat.setIsScreenShotEnabled(false)   \/\/ to disable taking screenshot \n                \n        startService(Intent(this, REVEChatApiService::class.java))\n    }<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4<\/h3>\n\n\n\n<p>Call following method when you want to open the chat window ( e.g. on implementation of setOnClickListener() of chat button )<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/\/ Java\n\n   private void openChatWindow() {\n        startActivity(new Intent(this, ReveChatActivity.class));\n    }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\"> \/\/ Kotlin\n private fun openChatWindow() {\n      startActivity(Intent(this, ReveChatActivity::class.java))\n }<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5<\/h3>\n\n\n\n<p>Stop REVEChatApiService from MAIN\/LAUNCHER Activity\u2019s onDestroy() method<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/\/ for Java\n\n@Override\nprotected void onDestroy() {\n       super.onDestroy();\n       if (!WebRTCHandler.INSTANCE.isWebRTCCallRunning())\n           stopService(new Intent(this, REVEChatApiService.class));\n   }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/\/ for Kotlin\n\noverride fun onDestroy() {\n       super.onDestroy()\n       if (!REVEChatApiService.isCallRunning())\n           stopService(Intent(this, REVEChatApiService::class.java))\n\n   }<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6<\/h3>\n\n\n\n<p>If Application class is not added, then please implement it and add in manifest file<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/\/ In manifest file, application tag add your Application class ( e.g. in below example \nimplmetation of Application class MyApplication )\n\n&lt;application\nandroid:name=&quot;.MyApplication&quot; \/&gt;<\/code><\/pre>\n\n\n\n<p>Need to add below line in onCreate() method<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ProcessLifecycleOwner.get().getLifecycle().addObserver(REVEChatAppLifecycleObserver.INSTANCE) \/\/ need to call from onCreate() method<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">import android.app.Application;\nimport androidx.lifecycle.ProcessLifecycleOwner;\nimport com.google.firebase.FirebaseApp;\nimport com.revesoft.revechatsdk.utils.REVEChatAppLifecycleObserver;\n\npublic class MyApplication extends Application {\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n        ProcessLifecycleOwner.get().getLifecycle().addObserver(REVEChatAppLifecycleObserver.INSTANCE);\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">import android.app.Application\nimport androidx.lifecycle.ProcessLifecycleOwner\nimport com.google.firebase.FirebaseApp\nimport com.revesoft.revechatsdk.utils.REVEChatAppLifecycleObserver\n\nclass MyApplication : Application() {\n    override fun onCreate() {\n        super.onCreate()\n        ProcessLifecycleOwner.get().lifecycle.addObserver(REVEChatAppLifecycleObserver.INSTANCE)\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7<\/h3>\n\n\n\n<p>Push Notification implementation<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>in project gradle file add below<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">dependencies {\n        classpath &#039;com.google.gms:google-services:4.4.2&#039;\n    }<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>in app gradle file add below dependency<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">dependencies {\n    \/\/ firebase push\n    implementation &#039;com.google.firebase:firebase-messaging:24.0.3&#039; \/\/ Update version if necessary    \n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>in application class onCreate() method, add below code<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">FirebaseApp.initializeApp(this);<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>create a class extending FirebaseMessagingService if not already there. In this class add below necessary codes to implement push notification. Need to use PushMessageProcessor class to send necessary information to SDK.<\/li>\n<\/ul>\n\n\n\n<p>Below code block shows implementation in Java<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">public class MessagingService extends FirebaseMessagingService {\n\n    private PushMessageProcessor pushMessageProcessor;\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n        pushMessageProcessor = new PushMessageProcessor(this);\n    }\n\n    @Override\n    public void onMessageReceived(RemoteMessage remoteMessage) {\n        pushMessageProcessor.handlePushMessage(new JSONObject(remoteMessage.getData()));\n    }\n\n\n    @Override\n    public void onNewToken(String refreshedToken) {\n        super.onNewToken(refreshedToken);\n        pushMessageProcessor.onNewToken(refreshedToken);\n    }\n } <\/code><\/pre>\n\n\n\n<p>Below code block shows implementation in Kotlin<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">import com.google.firebase.messaging.FirebaseMessagingService;\nimport com.google.firebase.messaging.RemoteMessage;\nimport com.revesoft.revechatsdk.message.processor.PushMessageProcessor;\nimport org.json.JSONObject;\n\npublic class MessagingService extends FirebaseMessagingService {\n  \n    private PushMessageProcessor pushMessageProcessor;\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n    \n        pushMessageProcessor = new PushMessageProcessor(this);\n    }\n\n    @Override\n    public void onMessageReceived(RemoteMessage remoteMessage) {\n       \n        pushMessageProcessor.handlePushMessage(new JSONObject(remoteMessage.getData()));\n    }\n\n    @Override\n    public void onNewToken(String refreshedToken) {\n        super.onNewToken(refreshedToken);\n        \n        pushMessageProcessor.onNewToken(refreshedToken);\n    }\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>declare the class in Manifest file, if not already declared<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">&lt;service\nandroid:exported =&quot;false&quot;\nandroid:name=&quot;.MessagingService&quot;&gt;\n\n    &lt;intent-filter&gt;\n          &lt;action android:name=&quot;com.google.firebase.MESSAGING_EVENT&quot; \/&gt;\n            &lt;\/intent-filter&gt;\n&lt;\/service&gt; <\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add Firebase Service Account JSON Configuration in Agent Dashboard (<a href=\"https:\/\/app.revechat.com\" target=\"_blank\" rel=\"noopener\">https:\/\/app.revechat.com<\/a>). Go to Settings -&gt; Chat Widgets . Select the chat widget, then go to code snippet. In android section, copy paste json data.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8<\/h3>\n\n\n\n<p>In the gradle.properties file add following lines<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">android.useAndroidX=true\nandroid.enableJetifier=true<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 9<\/h3>\n\n\n\n<p>Proguard Configuration<\/p>\n\n\n\n<p>In your proguard configuration file add below:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\n-keep class org.webrtc.** { *; }\n-keep class org.webrtc.voiceengine.** { *; }\n-dontwarn org.webrtc.**\n\n-keep class com.revesoft.revechatsdk.**{*;}\n-keep interface com.revesoft.revechatsdk.* { *; }\n-keep enum com.revesoft.revechatsdk.* { *; }\n-dontwarn com.revesoft.revechatsdk.**\n\n# Preserve generic type information for Gson\n-keepattributes Signature\n\n# Keep all classes and fields with generic types\n-keepclassmembers,allowobfuscation class * {\n    *;\n}\n\n# Keep Gson type adapters and serializers\/deserializers\n-keep class * extends com.google.gson.TypeAdapter\n-keep class * extends com.google.gson.JsonSerializer\n-keep class * extends com.google.gson.JsonDeserializer\n\n# Keep any classes that use Gson with generics\n-keep class * {\n    @com.google.gson.annotations.SerializedName &lt;fields&gt;;\n}\n<\/code><\/pre>\n\n\n\n<p><strong><em>GitHub sample application Link:<\/em><\/strong> <a href=\"https:\/\/github.com\/revechatofficial\/AndroidReveChatSDKTestApp\" target=\"_blank\" rel=\"noopener\">AndroidReveChatSDKTestApp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>REVE Chat\u2019s Android SDK can be seamlessly integrated with your mobile apps and enable your team to deliver in-app messaging to your app users for better engagement and customer support. This documentation shows you how to embed REVE Chat Android SDK in an Android application and get started in a few minutes. Minimum Requirements Android [&hellip;]<\/p>\n","protected":false},"author":36,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"help_center_type":[1868],"class_list":["post-273333","help-center","type-help-center","status-publish","hentry","help_center_type-mobile-sdk"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center"}],"about":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/types\/help-center"}],"author":[{"embeddable":true,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/users\/36"}],"version-history":[{"count":5,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273333\/revisions"}],"predecessor-version":[{"id":302900,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273333\/revisions\/302900"}],"wp:attachment":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/media?parent=273333"}],"wp:term":[{"taxonomy":"help_center_type","embeddable":true,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help_center_type?post=273333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}