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
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.Each archive ships with a
README.md that lists every step for that platform.Declaring the library - Android
Declaring the library - iOS
Dragios/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 andchat.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
Open external links
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.
appOriginwas taken from Console and still carries the/chat-widgetpath.connectionKeymatches the channel of the agent you want.- The device
localeis being passed, since the SDK does not read the default language from Console. - On iOS:
Info.plistcarriesNSPhotoLibraryUsageDescriptionandNSCameraUsageDescription- without them the app exits when the customer taps the attachment button. - On Android, if you embed
FptChatViewyourself:fileChooserHandlerandonActivityResultare wired, and the Activity setswindowSoftInputMode="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.