Skip to main content
DocumentationOptional capabilities

Enable optional push and voice capabilities

Add push or voice only when the host wants the extra native permissions, provider setup and lifecycle responsibility.

On this page

The base chat SDK stays permission-free while selected hosts opt into explicit APNs, FCM or microphone capabilities.

Choose a capability explicitly

Chat and the native widget are the base release. iOS optional products are DobroDeskPush and DobroDeskVoice. Android optional coordinates are com.dobrodesk:dobrodesk-push:0.2.0 and com.dobrodesk:dobrodesk-voice:0.2.0 in the bundled local Maven repository. These are native products: the Flutter, React Native, NativeScript and Capacitor wrappers do not export a push client. The public release asset is https://github.com/comstud-io/dobrodesk-mobile-sdk/releases/download/v0.2.0/dobrodesk-mobile-sdk-0.2.0-bundle.tar.gz.

Do not add either capability to every host by default. Push requires host-owned APNs or FCM registration, token rotation, notification permission and an authenticated relay. Voice requires host-owned microphone permission and audio lifecycle. The base SDK never asks for either permission or starts background work.

Android opt-in modules
// Register the extracted bundle's native/maven directory in host settings first.
dependencies {
  implementation("com.dobrodesk:dobrodesk-voice:0.2.0") // optional
  // implementation("com.dobrodesk:dobrodesk-push:0.2.0") // optional
}

Keep push registration outside the base SDK

Register the device token with your authenticated provider flow and bind it to the verified DobroDesk account or session. Rotate tokens, remove them on logout and let the server discard invalid provider tokens. Keep notification payloads limited to the documented identifiers; do not place reply text, customer messages or credentials in a push payload.

The base client does not import Firebase and does not create an APNs or FCM registration. A host that does not need push should not request notification permission or include the optional artifact.

Keep voice permission and cleanup explicit

Request microphone permission only after the customer chooses voice and the integration is allowed to use it. If permission is denied or the server capability is unavailable, hide the voice action rather than showing a permanently disabled control.

Dispose the attached voice facade during wrapper logout or replacement. Direct iOS and Android native hosts should stop their native voice client and release it before reset and client replacement. Stop pending audio work, unsubscribe listeners and ignore late starts after close, reset or account change.

Attach voice only after native setup

After the host installs the selected native voice module, its platform adapter creates the DobroDeskVoicePort required by the framework wrapper. The port is host-created; the base SDK does not provide a public audio implementation or request permission on its own.

Framework voice lifecycle
const voice = await client.attachVoice(nativeVoicePort);
await voice.start();

// On logout or host teardown:
await voice.dispose();