Skip to main content
The Android and iOS SDKs put the Live Chat channel’s own chat window inside your app. Both are thin wrappers around a WebView, declare no dependencies, and take exactly three parameters; everything else comes from the configuration on Console.
The SDKs share their configuration with the web widget. Configure the Web widget channel first, following Live Chat channel, then take the connectionKey from the Config tab.

The three initialisation parameters

appOrigin must keep the /chat-widget path. Give it only the root domain and the WebView loads whichever app sits at the root, leaving the chat window blank.
Unlike the website, the mobile SDKs do not read Default language from Console. Leave locale empty and the chat window always shows Vietnamese. Pass the device language into locale so the app speaks whatever your customer is using.

Minimum requirements

Getting the SDK packages

We hand the SDKs over as installation packages, not through a public repository. You receive two archives, one per platform - take only the one for the platform you build on.

fpt-agent-chat-1.0.0-android.zip

Unzip it, then copy the android/maven folder inside into your project, for example into libs/fpt-agent-chat/maven. The android/chat-1.0.0.aar file beside it is the standalone build, for projects that cannot add a Maven repository.

fpt-agent-chat-1.0.0-ios.zip

Unzip it, then drag ios/FptAgentChat.xcframework into your target.
On macOS, unzip with Finder or the unzip command, and do not re-zip the extracted folder. .xcframework is a bundle; re-zipping it with another tool can break the links inside it and Xcode then reports errors that are hard to read.
Each archive ships with a README.md that lists every step for that platform.

Declaring the library - Android

Declaring the library - iOS

Drag ios/FptAgentChat.xcframework into the target, then make sure it is listed under Frameworks, Libraries, and Embedded Content with Embed & Sign.

Android

Open the chat window full screen

Embed the chat window in an existing screen

Required when you embed FptChatView yourself

FptChatActivity already wires the file picker up. If you place FptChatView on a screen of your own, you have to wire it yourself: without it the attachment button does nothing when tapped, and because the callback is left hanging, the second tap does nothing either.
The Activity holding FptChatView also needs android:windowSoftInputMode="adjustResize" in AndroidManifest.xml, otherwise the keyboard covers the message box. FptChatActivity already carries this attribute.

Handle the back button

Lifecycle

Call all three lifecycle methods. Skipping release() keeps the WebView alive after the screen closes and leaks memory.

iOS

Required: two keys in Info.plist

The chat window lets customers send attachments and chat.allow_attachments is on by default, so this is the normal path rather than a rare case. If Info.plist is missing NSPhotoLibraryUsageDescription or NSCameraUsageDescription, the operating system closes your app the moment the customer taps the attachment button - not an error message, an exit. Declare both, in wording a customer can read.

Open the chat window full screen

Embed the chat window in an existing screen

Going back inside the WebView

Things to remember

Configuration lives on Console

Colours, greeting, suggested questions and the attachment policy all come from the Customize widget tab. Change them on Console and the app follows immediately - no new release needed.

Language has to be passed in

This is the one difference from the web. Read the device’s system language and pass it into locale.

One channel, several touchpoints

Website and mobile app share a single connectionKey, so conversations and configuration are one and the same.

A new channel means a new key

Delete the Website channel and recreate it and you get a new connectionKey. Apps in the field have to be updated with it.

Pre-release checklist

  • The Web widget channel has been configured and saved at least once on Console.
  • appOrigin was taken from Console and still carries the /chat-widget path.
  • connectionKey matches the channel of the agent you want.
  • The device locale is being passed, since the SDK does not read the default language from Console.
  • On iOS: Info.plist carries NSPhotoLibraryUsageDescription and NSCameraUsageDescription - without them the app exits when the customer taps the attachment button.
  • On Android, if you embed FptChatView yourself: fileChooserHandler and onActivityResult are wired, and the Activity sets windowSoftInputMode="adjustResize".
  • Open, close and go back several times to be sure the lifecycle is handled correctly.
  • Try it on a weak connection to see whether the loading state and error messages still make sense.
Attachment size limits, permitted formats and the shared error codes are in the Technical appendix.