Muokkaa

Jaa


Integrate TelecomManager into the UI Library

The Azure Communication Services UI Library provides out-of-the-box support for TelecomManager. Developers can provide their own configuration for TelecomManager to be used for the UI Library.

In this article, you learn how to set up TelecomManager correctly by using the UI Library in your application.

Prerequisites

For more information, see the open-source Android UI Library and the sample application code.

Set up TelecomManager integration

The Azure Communication Services Calling SDK supports TelecomManager integration. You can enable this integration in the UI Library by configuring an instance of CallCompositeTelecomManagerOptions. For more information, see Integrate with TelecomManager.

CallCompositeTelecomManagerIntegrationMode provides options for SDK_PROVIDED_TELECOM_MANAGER and APPLICATION_IMPLEMENTED_TELECOM_MANAGER. SDK_PROVIDED_TELECOM_MANAGER requires phoneAccountId and use implementation from calling SDK. APPLICATION_IMPLEMENTED_TELECOM_MANAGER is for if TelecomManager is integrated in application.

    val callComposite: CallComposite = CallCompositeBuilder()
        .telecomManagerOptions(CallCompositeTelecomManagerOptions(
            CallCompositeTelecomManagerIntegrationMode.SDK_PROVIDED_TELECOM_MANAGER,
            "app_id"
        )).build()

Hold and Resume API

For APPLICATION_IMPLEMENTED_TELECOM_MANAGER use hold and resume to manage call state.

    callComposite.hold()?.whenComplete { _, error ->  }
    callComposite.resume()?.whenComplete { _, error ->  }

Next steps