Integrate with Android app

To integrate floatbot sdk in android app first download floatbot aar file

Sdk has only 1 fragment which can be placed any activity

Your Activity must implement OnFloatbotInteractionListener interface and override its method onChatWindowClosed

public class SampleActivity extends AppCompatActivity implements FloatbotFragment.OnFloatbotInteractionListener{
  //Called when user click on closebutton from chatwindow
  public void onChatWindowClosed() {

To initialize SDK, We need to pass below paramaters in fragment

 FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
   flb =  new FloatbotFragment(this);
Bundle bundle = new Bundle();

BOT-ID : Your floatbot bot id BOT-TOKEN : You will get bot token from Floatbot Dashboard -> Settings -> Android Tab

To hide header from chat window, simply pass showHeader value as false. By default value will be true


To show list of sessions to user. You can call showSessions() method of fragment class


To use login architecture in your app. Create a json string and pass encrypted data in bundle Encryption method - 'AES CBC 256'

bundle.putString("data",AES-CBC-256 Encrypted Json String);

To register for push notification, you need to pass gcm/fcm token in bundle as below

bundle.putString("push_token","GCM/FCM TOKEN");

You can also update fcm/gcm token later by calling below function

FloatbotUtils.updatePushToken("GCM/FCM TOKEN"); 

For push notification, you will need to handle json string in onMessageReceived

public void onMessageReceived(RemoteMessage message) {
  //Create notification	

You can also set your own loading screen/no connection (layout), which will be shown when chatbot is loading or when their is no internet access


If you have enabled mic in chatbot. You need to handle Mircophone permission in activity before loading fragment

Currently as of now attachment item is not supported in android floatbot sdk

To Delete user/Clear/Logout from Floatbot app


Please let us know if you encounter any problems at

You will find Bot ID and Token in the chatbot settings of your Bot.

  • Go to Chatbot Section of your Dashboard

chatbot development platform

  • Go to Settings of your Chatbot

customer engagement bot

  • Inside Settings of your chatbot, you will find BOT ID and Token.

chatbot for call center

You can have a look at Sample