Skip to main content
Share
Guides

How to Add a Chatbot to Your Mobile App: Android, iOS, Flutter and React Native (2026)

To add a chatbot to a mobile app, build the bot once in a chatbot platform, add the platform's native SDK to your Android, iOS, Flutter or React Native project, initialise it with your API key and bot ID, and open the chat screen from a button. Native SDKs give better performance, push notifications and offline queuing than a WebView.

Content & Engineering
Dec 7, 2025
16 min read
Updated Oct 2026
add chatbot to mobile appmobile chat sdkios chat sdkandroid chatbot sdkflutter chatbot sdk
TL;DR

To add a chatbot to a mobile app, build the bot once in a chatbot platform, add the platform's native SDK to your Android, iOS, Flutter or React Native project, initialise it with your API key and bot ID, and open the chat screen from a button. Native SDKs give better performance, push notifications and offline queuing than a WebView.

Key Takeaways
  • There are two ways to put a chatbot inside a mobile app.
  • The quick way loads your web chat widget in a WebView, an embedded browser.
  • The better way uses a native SDK that draws the chat with the platform's own UI components.
  • A WebView can work for a chat used now and then, but it brings browser overhead, weaker integration with push notifications and app navigation, and a look that rarely matches the rest of the app.

Why Your Mobile App Needs a Native Chatbot SDK (Not a WebView)

There are two ways to put a chatbot inside a mobile app. The quick way loads your web chat widget in a WebView, an embedded browser. The better way uses a native SDK that draws the chat with the platform's own UI components. A WebView can work for a chat used now and then, but it brings browser overhead, weaker integration with push notifications and app navigation, and a look that rarely matches the rest of the app.

Native SDK vs WebView

Illustrative estimates for planning, not measured results.
FactorWebView wrapperNative SDK
RenderingA web page inside the appNative views (Compose, SwiftUI, Flutter widgets, React Native components)
Offline behaviourNeeds a connection to loadMessages queued and sent when the connection returns
Push notificationsExtra work to wire upFCM (Android) and APNs (iOS) support built in
Look and feelLooks like a websiteFollows your app's theme, including dark mode
Device featuresLimited by web permissionsNative file and image pickers
Memory and batteryRuns a browser engineOnly the views you show

Conferbot has native SDKs for Android (Kotlin, with XML Views and Jetpack Compose), iOS (Swift, with UIKit and SwiftUI), Flutter (Dart) and React Native (TypeScript). The source is public on GitHub: conferbot-android, conferbot-ios, conferbot-flutter and conferbot-react-native.

What the SDKs Include

  • Real-time messaging over Socket.IO
  • Offline support: messages queue while offline and send when the connection returns
  • Live agent handover: the conversation moves from bot to a person in the same chat, with typing indicators
  • File uploads: images and documents
  • Push notifications: FCM on Android, APNs on iOS
  • Theming: colours, fonts and dark mode
  • Drop-in or custom UI: use the ready-made chat screen or build your own on the SDK's state

The bot itself is built once in the Conferbot builder, with an AI agent that can answer from your knowledge base, and runs the same in your app, on your website and in messaging apps.

Android SDK: Add a Chatbot to Your Android App

Requirements

  • Android 5.0+ (minSdk 21)
  • Kotlin
  • Your Conferbot API key and bot ID

Step 1: Add the SDK

Add the SDK to your project following the installation section of the conferbot-android README, which lists the repository and dependency coordinates for the current release, then sync Gradle.

Step 2: Initialise in Your Application Class

import android.app.Application
import com.conferbot.sdk.core.Conferbot
import com.conferbot.sdk.models.ConferBotConfig

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        Conferbot.initialize(
            context = this,
            apiKey = "YOUR_API_KEY",
            botId = "YOUR_BOT_ID",
            config = ConferBotConfig(
                enableNotifications = true,
                enableOfflineMode = true
            )
        )
    }
}

Step 3: Show the Chat

Option A, full-screen chat Activity:

Conferbot.openChat(context)

Option B, Jetpack Compose:

@Composable
fun HomeScreen() {
    var showChat by remember { mutableStateOf(false) }
    Button(onClick = { showChat = true }) { Text("Support Chat") }
    if (showChat) {
        ConferBotChatScreen(onDismiss = { showChat = false })
    }
}

Option C, headless: collect the SDK's state flows (messages, connection status, current agent) and draw your own UI.

The Android SDK uses Retrofit for REST calls, Socket.IO for real-time messages, and Material Design 3 components with automatic dark theme.

iOS SDK: Add a Chatbot to Your iOS App

Requirements

  • iOS 14+
  • Swift, with UIKit or SwiftUI
  • Your Conferbot API key and bot ID

Step 1: Add the Package

In Xcode, choose File > Add Packages and enter the repository URL https://github.com/conferbot/conferbot-ios. CocoaPods instructions are in the conferbot-ios README.

Step 2: Initialise

import SwiftUI
import Conferbot

@main
struct YourApp: App {
    init() {
        Conferbot.shared.initialize(
            apiKey: "YOUR_API_KEY",
            botId: "YOUR_BOT_ID"
        )
    }
    var body: some Scene {
        WindowGroup { ContentView() }
    }
}

Step 3: Show the Chat

SwiftUI:

struct ContentView: View {
    @State private var showChat = false
    var body: some View {
        Button("Support Chat") { showChat = true }
            .sheet(isPresented: $showChat) { ChatView() }
    }
}

UIKit:

Conferbot.shared.present(from: self)

The iOS SDK supports UIKit and SwiftUI, APNs push notifications for agent replies, and automatic light and dark mode.

Try it yourself
Build your first chatbot free
Free plan, no credit card required. Live on your site in about 10 minutes.
Start building free

Flutter SDK: Add a Chatbot to Your Flutter App

Requirements

  • Flutter 3.10+ and Dart 3
  • Your Conferbot API key and bot ID

Step 1: Add the Package

Add conferbot_flutter to your project as described in the conferbot-flutter README, then run flutter pub get.

Step 2: Wrap Your App With the Provider

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:conferbot_flutter/conferbot_flutter.dart';

void main() {
  runApp(
    ChangeNotifierProvider(
      create: (_) => ConferBotProvider(
        apiKey: 'YOUR_API_KEY',
        botId: 'YOUR_BOT_ID',
        config: ConferBotConfig(
          enableNotifications: true,
          enableOfflineMode: true,
        ),
      ),
      child: MyApp(),
    ),
  );
}

Step 3: Show the Chat Widget

ChatWidget(
  title: 'Support Chat',
  showTimestamps: true,
)

Push it as a route or embed it in a screen. For a custom design, read the provider's state and build your own widgets.

Cross-Platform Advantage

With the Flutter SDK, one codebase ships the chat to iOS and Android, with consistent behaviour on both.

React Native SDK: Add a Chatbot to Your React Native App

Requirements

  • React 17+ and React Native 0.70+
  • TypeScript recommended
  • Your Conferbot API key and bot ID

Step 1: Add the Package

Install @conferbot/react-native following the conferbot-react-native README, which covers peer dependencies and native setup.

Step 2: Wrap Your App With the Provider

import { ConferBotProvider } from '@conferbot/react-native';

export default function App() {
  return (
    <ConferBotProvider
      apiKey="YOUR_API_KEY"
      botId="YOUR_BOT_ID"
      config={{ enableNotifications: true, enableOfflineMode: true }}
    >
      {/* your app */}
    </ConferBotProvider>
  );
}

Step 3: Open the Chat From Any Screen

import { Button } from 'react-native';
import { useConferBot } from '@conferbot/react-native';

export default function HomeScreen() {
  const { openChat } = useConferBot();
  return <Button title="Open Support Chat" onPress={() => openChat()} />;
}

The SDK is written in TypeScript with type definitions, uses native React Native components (no WebView), and includes event tracking. You can use the drop-in widget, build a fully custom UI on the hook, or mix the two.

Try the free chatbot builder
600 conversations a month, every channel, no credit card.
Start free

Which SDK Should You Use? Decision Guide

Illustrative estimates for planning, not measured results.
Your SituationRecommended SDKWhy
Building a new Android appAndroid SDKXML Views or Jetpack Compose, Material Design 3
Building a new iOS appiOS SDKSwiftUI + UIKit support, Apple design guidelines
Building for both iOS + AndroidFlutter SDKSingle codebase, consistent UX, great performance
Existing React Native appReact Native SDKDrop-in provider, TypeScript, hooks-based API
Web app (React, Next.js, etc.)Web widgetOne script snippet; see the React install guide
Don't want to build an appWhatsApp/MessengerNo app needed, reach users on existing platforms

All SDKs Share the Same Backend

Regardless of which SDK you choose, you get the same bot logic, same knowledge base, same analytics, and same live agent handover. Build your bot once in the Conferbot builder, and it works identically across all platforms.

Integration Patterns

The SDKs support three integration patterns (exact names differ per platform; see each README):

  1. Drop-in screen: open the ready-made chat screen from a button. Handles UI, state, networking and offline queuing. Best for getting started fast.
  2. Embedded: place the chat view inside one of your own screens or sheets.
  3. Headless: use the SDK's state and functions with your own UI, for apps with strict design systems.

How to Benchmark a Chat SDK: Native vs WebView

The difference between a native SDK and a WebView shows up in load time, memory, battery and smoothness, and the size of the gap depends on your app and devices. Rather than rely on any vendor's published numbers, including ours, measure it in your own app.

What to Measure

Illustrative estimates for planning, not measured results.
TestWhat to measureTool
Time to chatFrom tapping the chat button to the first message visibleScreen recording, or Android Studio and Xcode profilers
MemoryMemory added after opening chat and exchanging 100 messages with imagesAndroid Studio Memory Profiler, Xcode Instruments (Allocations)
BatteryEnergy use with chat open and idle, and in the background with push onAndroid Studio Energy Profiler, Xcode Energy Log
SmoothnessDropped frames while scrolling a long conversationAndroid GPU rendering profile, Xcode Instruments (Animation Hitches)
Offline recoverySend messages in airplane mode, reconnect, check delivery and orderManual test
App sizeDownload and install size added by the SDKPlay Console and App Store Connect size reports

Test on Realistic Devices

Test on at least three devices: a recent flagship, a mid-range phone and an older low-end phone. Low-end devices are where differences show most and where many users are. Run the same scenarios for each SDK or WebView you are comparing, inside your real app rather than a blank demo, because your app's own work (maps, video, images) competes for the same resources.

Network Efficiency

A WebView chat loads the web widget's code and assets when it opens; a native SDK sends only message data over its real-time connection. Check data usage per conversation with the network profiler, which matters for users on metered connections.

Build It Into CI

Once you have a baseline, add the key measurements to your release testing so a later SDK or app update cannot quietly slow the chat down. For a wider comparison of platforms, including AI and channel coverage, see our no-code chatbot builder comparison, and if you are deciding whether to build your own chat at all, read how to build a chatbot without coding.

Security and Data Privacy in Mobile Chat SDKs

Mobile chatbots handle sensitive data - customer names, email addresses, payment details, health information, and conversation history. Security and privacy are not optional features; they are foundational requirements that affect your compliance posture, App Store approval, and user trust.

Data Encryption Standards

A production-grade mobile chat integration should cover encryption at every layer:

Illustrative estimates for planning, not measured results.
LayerStandardWhat It Protects
In-transit encryptionTLS 1.3All data moving between the app and server
At-rest encryption (device)AES-256Chat history, cached messages, user tokens stored locally
At-rest encryption (server)AES-256Conversation logs, user profiles, knowledge base data
Key managementHardware-backed keystoreEncryption keys stored in Android Keystore or iOS Secure Enclave
WebSocket connectionsWSS (TLS-encrypted)Real-time messaging channel

Ask any SDK vendor, including us, how each layer is handled, and check the SDK source, which for Conferbot is public on GitHub.

Local Data Storage and Retention

Chat SDKs store data locally for offline support and conversation persistence. Ensure your SDK handles local storage responsibly:

  • Encrypted database: Chat history should be stored in an encrypted local database (SQLCipher for Android Room, encrypted Core Data for iOS). Plain-text SQLite databases are a vulnerability.
  • Retention limits: decide how long chat history stays on the device and on the server, and purge older data automatically. This limits exposure if a device is lost.
  • Secure file storage: Uploaded images, voice messages, and documents should be stored in the app's sandboxed storage directory, not on external/shared storage where other apps could access them.
  • Session token management: Authentication tokens should have short expiration windows (1-24 hours) with automatic refresh. Never store long-lived tokens in SharedPreferences or UserDefaults without encryption.

Compliance Requirements by Industry

RegulationApplies ToKey SDK Requirements
GDPREU usersConsent collection, data export, right to deletion, data minimization
HIPAAUS healthcareBAA with vendor, audit logging, access controls, encrypted PHI
SOC 2SaaS / enterpriseAccess controls, monitoring, incident response, change management
CCPACalifornia usersOpt-out of data sale, data disclosure, deletion rights
PCI DSSPayment dataNever store card numbers in chat, tokenize payment flows

App Store Security Requirements

Both Apple and Google enforce security standards for apps that handle user data:

  • Apple App Store: Apps must declare all data collection in the Privacy Nutrition Label. Declare the chat SDK's data collection accurately, including messages, contact details and files.
  • Google Play: The Data Safety section requires disclosure of all data types collected, stored, and shared. SDKs that phone home to undisclosed third-party domains trigger rejection. Ensure your chat SDK's data flow is fully documented.

Security Best Practices for Implementation

  1. Protect API keys. Anything shipped in an app can be extracted, so use keys scoped to what the app needs, keep them out of source control, and rotate them if exposed.
  2. Implement certificate pinning. Prevent man-in-the-middle attacks by pinning your chatbot server's SSL certificate in the SDK configuration.
  3. Audit third-party dependencies. Run npm audit (React Native), flutter pub deps (Flutter), or dependency scanning tools to ensure no SDK dependency has known vulnerabilities.
  4. Gate sensitive chat history behind your app's own login or biometric check (Face ID, Touch ID, Android BiometricPrompt) in healthcare and finance apps.
  5. Log redaction: Ensure chat logs sent to your analytics platform redact PII (email addresses, phone numbers, card numbers) before transmission.

Security is a differentiator. When enterprise clients evaluate chat SDKs, the security documentation and compliance certifications often outweigh feature comparisons. Invest in getting it right from the start, and it becomes a competitive advantage rather than a last-minute scramble. The OWASP Mobile Top 10 provides a comprehensive framework for identifying and mitigating mobile security risks that apply directly to chat SDK implementations. For platforms that handle security out of the box, see our no-code chatbot builder comparison. If your use case involves customer support workflows, the customer support chatbot guide covers how to configure secure handoff and data retention policies across channels.

SDK Features That Matter in Real Apps

Offline Message Queuing

When the user loses connection (a train tunnel, airplane mode, weak signal), messages queue locally and send when the connection returns, so nothing typed is lost.

Live Agent Handover

When the bot cannot help, a person from your team takes over in the same chat screen. Your agents reply from the Conferbot inbox, alongside website and messaging conversations, and the user sees typing indicators while they write. See our human handoff guide.

Push Notifications

When an agent replies while the app is in the background, the user gets a push notification (FCM on Android, APNs on iOS) and can tap straight back into the chat.

File Uploads

Users can send images and documents, for example a screenshot of an error or a photo of a damaged product, using the platform's native pickers.

Theming

  • Android: Material Design 3 with automatic dark theme
  • iOS: colours, fonts and avatars, with automatic light and dark mode
  • Flutter and React Native: customisable widgets and components

Match your app's palette and typography so the chat feels like part of the app.

Open Source SDKs on GitHub

Accessibility

Check the chat with VoiceOver on iOS and TalkBack on Android, keep tap targets at least 44 by 44 points (Apple's guideline) or 48 by 48 dp (Android's), and meet WCAG contrast of 4.5:1 for body text. Test with your own theme applied, since custom colours can break contrast.

Share this article:

Was this article helpful?

Ready to build your chatbot?

Join the businesses. Deploy on website, WhatsApp, and 11 more channels in minutes. Free forever plan available.

No credit cardNo coding13+ channels
Start Building Free

Get chatbot insights delivered weekly

Join 5,000+ professionals getting actionable AI chatbot strategies, industry benchmarks, and product updates.

🎯Automate this with a free chatbot

Build and deploy in 10 minutes. No coding needed.

❓FAQ

How to Add a Chatbot to Your Mobile App FAQ

Everything you need to know about chatbots for how to add a chatbot to your mobile app.

🔍
Popular:

Build the bot in a chatbot platform, then add the platform's native SDK to your app. With Conferbot you add the Android, iOS, Flutter or React Native SDK from its GitHub repository, initialise it with your API key and bot ID when the app starts, and open the chat screen from a button. The same bot also runs on your website and messaging apps.

Yes. Native SDKs draw the chat with the platform's own components: Jetpack Compose or XML Views on Android, SwiftUI or UIKit on iOS, Flutter widgets, or React Native components. Conferbot's SDKs work this way, which gives you offline queuing, push notifications and a look that matches your app instead of an embedded web page.

The best SDK is the one that is native to your stack, supports offline queuing, push notifications and live agent handover, and lets you match your design or build a custom UI. Benchmark candidates inside your own app on a low-end device. If you also want an AI chatbot builder and website chat, Conferbot covers all four mobile platforms from one bot.

Yes. Conferbot's iOS SDK supports both SwiftUI and UIKit on iOS 14 and later. Add it with Swift Package Manager from github.com/conferbot/conferbot-ios, call Conferbot.shared.initialize with your API key and bot ID, then show ChatView in a sheet or present the chat from a UIKit view controller.

Partly. Conferbot's SDKs queue messages while the device is offline and send them in order when the connection returns, so nothing the user typed is lost. The bot and your agents can only reply once the device is back online, so show a clear offline state in the chat.

Yes. You build the chatbot once in the Conferbot builder and it runs in your Android, iOS, Flutter or React Native app, on your website, and on channels such as WhatsApp, Messenger, Instagram and Telegram. Conversations from all of them arrive in one inbox, so your team can take over anywhere.

About the Author

Content & Engineering

The Conferbot team writes about building, deploying, and improving AI chatbots.

View all articles
Skip the blank canvas
Start from one of 250+ free chatbot templates for lead generation, support, e-commerce, and 20+ industries - customize and launch in minutes.
Browse free templates

Related Articles

Omnichannel Platform

One Chatbot,
Every Channel

Your chatbot works seamlessly across WhatsApp, Messenger, Slack, and 6 more platforms. Build once, deploy everywhere.

View All Channels
Conferbot
online
Hi! How can I help you today?
I need pricing info
Conferbot
Active now
Welcome! What are you looking for?
Book a demo
Sure! Pick a time slot:
#support
Conferbot
New ticket from Sarah: "Can't access dashboard"
Auto-resolved. Password reset link sent.