Mobile SDKs
Troubleshooting
Fix common problems when integrating the STINGIM Android and iOS SDKs.
Initialisation fails
- Wrong credentials — check the Plugin ID, App Secret and channel ID of the App SDK app (Settings → Channels → App SDK). The App Secret is shown only once; create a new app if you lost it.
- "SDK is already initialized with a different identity; disconnect first" (Android) — call
Stingim.disconnect()before initialising with another user or token. - Server-side token exchange returns a non-zero
code— the response is HTTP 200 with{ "code": …, "message": … }; readmessage. "Plugin or channel does not exist" means the IDs do not match. - Turn on debug logging (
StingimConfig.setDebugMode(true)on Android,debugMode = trueon iOS). Logs never contain tokens or message content.
Cannot connect
- The device must reach
https://api.stingim.comandwss://msg.stingim.com(TLS on port 443). Corporate proxies that block WebSockets break real-time messaging. - The SDK reconnects automatically with exponential back-off, and iOS also reconnects when the app returns to the foreground or the network changes.
session_evictedmeans the same visitor connected on another device or process. The SDK does not take the session back automatically.
Token expired or rejected
- Android: implement
StingimAuthListener. In token mode, fetch a new token from your server inonReauthenticationFailedand callStingim.initWithToken(...)again. - iOS: set
Stingim.shared.reauthenticationHandlerto return a fresh(contactId, contactToken). - Visitor tokens are valid for 7 days.
Identity shows rejected or unverified
The signature rules are the same as for the web widget — see Identity verification troubleshooting. unverified with a userHash means verification is off for the app.
Messages are not answered
- The visitor may be in a queue: check the queue position (
getQueueInfo/fetchQueueInfo) and make sure agents are online or an AI agent is assigned to the App SDK channel. - Outside business hours the AI disclosure / business-hours notice is shown when
projectIdis configured.
Images do not show
Incoming media must be loaded through signed preview URLs (StingimFileService.resolvePreviewUrl on Android, previewURL(for:) on iOS), not the raw object_key. Signed URLs expire; request a new one after 10 minutes.
App crashes when picking a photo or recording (iOS)
Add NSPhotoLibraryUsageDescription, NSCameraUsageDescription and NSMicrophoneUsageDescription to Info.plist.
"No pending evaluation invite"
A rating can only be submitted after the server sent a rating invitation for the conversation (onEvaluationInvite / stingimDidReceiveEvaluationInvite).
swift build does not build the UI
StingimChannelUI needs UIKit and is only compiled for iOS (canImport(UIKit)). Build for an iOS destination in Xcode or with xcodebuild.
Android build cannot resolve PhotoView
PhotoView 2.3.0 is a transitive dependency of the SDK that is not on Maven Central. It is mirrored in the STINGIM repository, so make sure maven { url "https://stingim.com/sdk/maven" } is in dependencyResolutionManagement.repositories (or in allprojects.repositories for older builds) — see Android install. If you link the AAR directly, either add that repository or JitPack.
Still stuck? Contact support with the SDK version, platform, OS version and the time of the failure.
Found a mistake? Email [email protected]
