Overview
Kotlin Multiplatform SDK for embedding the SparrowDesk chat widget in Android and iOS apps
The SparrowDesk Mobile SDK loads the same web chat widget you use on the web inside a native WebView (Android) or WKWebView (iOS). You get a Kotlin and Swift API to open and close the chat, identify users with contact fields, attach tags, listen to open/close events, and query widget state.
Latest release: v0.1.1
Platform support
| Platform | Minimum version | Implementation |
|---|---|---|
| Android | API 24 | WebView + @JavascriptInterface |
| iOS | 16.0 | WKWebView + WKScriptMessageHandler |
What you need
- Your widget domain and token from SparrowDesk (same values as the web widget; see Chat Widget).
- An Android or iOS app that can add the dependency (JitPack on Android, Swift Package Manager on iOS).
Installation
Follow the dedicated guides:
Quick start
Create a SparrowDeskConfig with your domain and token, construct SparrowDeskSDK, call attach with your activity or view controller, then openWidget() when the user taps your chat button. Always call destroy() when the hosting screen is torn down.
For every method, type, and platform nuance, see the API reference.
Source and license
The SDK is open source on GitHub: github.com/SparrowDesk/sparrowdesk-mobile-sdk (MIT).