Skip to content

Commit

Permalink
Merge pull request #27 from voximplant/update_doc
Browse files Browse the repository at this point in the history
(audiocall) Documentation updated
  • Loading branch information
jedi1150 authored Feb 12, 2024
2 parents dd52544 + 684588a commit 58980f3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Voximplant Kotlin Demos

## [Audio Call with ConnectionService](audiocall)
This demo demonstrates audio call of the Voximplant Android SDK with ConnectionService integration.
## [Audio Call](audiocall)
This demo demonstrates audio call of the Voximplant Android SDK with/without [ConnectionService](audiocall/ConnectionService.MD) integration.

## [Video Call](videocall)
The demo demonstrates basic video call functionality of the Voximplant Android SDK.
Expand Down
12 changes: 9 additions & 3 deletions audiocall/ConnectionService.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ This article provides a step-by-step tutorial to integrate a self-managed `Conne

A self-managed `ConnectionService` resolves the situation of multiple calls from various applications that also use the ConnectionService API, such as switching between calls on hold or answering an incoming call when you're already on a call. It also allows answering or declining calls on wearable devices.

## Check system feature availability
A self-managed `ConnectionService` can only be used if the system has the `FEATURE_TELECOM` or `FEATURE_CONNECTION_SERVICE` features.
Otherwise, the system throws an exception on any TelecomManager API call.

System features can be checked via [PackageManager.hasSystemFeature](https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)).

## Manifest declarations and permissions
To integrate a self-managed `ConnectionService`, declare the `MANAGE_OWN_CALLS` permission in the AndroidManifest.xml file.
```XML
Expand Down Expand Up @@ -87,7 +93,7 @@ The Voximplant Android SDK provides the following capabilities for an ongoing ca

Mute and audio device changing capabilities are fully managed by the Voximplant Android SDK and do not require any `Connection` API call.

However, to put the call on hold, the application `Connection` state should be changed via the `Connection.setOnHold()` API. Please be sure to change the `Connection` state only if `ICall.hold()` is completed successfully.
However, to put the call on hold, the application `Connection` state should be changed via the `Connection.setOnHold()` API. Please be sure to change the `Connection` state only if `ICall.hold()` is completed successfully.

```Kotlin
call?.hold(hold, object : ICallCompletionHandler {
Expand All @@ -110,9 +116,9 @@ Please note:
<img src="../screenshots/schemes/connection_scheme_ongoing_call.png">

### End ongoing call
Either a user or a remote party can end an ongoing call.
Either a user or a remote party can end an ongoing call.

If the user ends the call, the application should call `ICall.hangup()` API, so the Voximplant Android SDK triggers the `ICallListener.onCallDisconnected()` event.
If the user ends the call, the application should call `ICall.hangup()` API, so the Voximplant Android SDK triggers the `ICallListener.onCallDisconnected()` event.

If the remote party ends the call, the Voximplant Android SDK informs the application by triggering the `ICallListener.onCallDisconnected()` event.

Expand Down
14 changes: 9 additions & 5 deletions audiocall/README.MD
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Voximplant Audio Call Demo with ConnectionService integration

This demo demonstrates audio call of the Voximplant Android SDK with ConnectionService integration. The application supports audio calls between this Android app and other apps that use any Voximplant SDK.
This demo demonstrates audio call of the Voximplant Android SDK with/without [ConnectionService](ConnectionService.MD) integration.
The application supports audio calls between the current Android app and other apps that use any Voximplant SDK.
It uses two ways to control calls:
- Default (`AudioCallManagerDefault`)
- Integration with self-managed ConnectionService (`AudioCallManagerTelecom`)

Based on MVVM architectural pattern.
The choice of implementation depends on the device's Android version and the `FEATURE_TELECOM` or `FEATURE_CONNECTION_SERVICE` availability in the system.

`ConnectionService` is an abstract service that could be implemented by any apps which either:
`ConnectionService` is an abstract service that could be implemented by any apps which either:
1. Can make phone calls (VoIP or otherwise) and want those calls to be integrated into the built-in phone app. Referred to as a system managed `ConnectionService`.
2. Are a standalone calling app and don't want their calls to be integrated into the built-in phone app. Referred to as a self managed `ConnectionService`.
`ConnectionService` requires Android API level 23 according to the [official Android documentation](https://developer.android.com/reference/android/telecom/ConnectionService), but this app uses `Connection.PROPERTY_SELF_MANAGED` which requires API level 26.
2. Are a standalone calling app and don't want their calls to be integrated into the built-in phone app. Referred to as a self-managed `ConnectionService`.
`ConnectionService` requires Android API level 23 according to the [official Android documentation](https://developer.android.com/reference/android/telecom/ConnectionService), but this app uses `Connection.PROPERTY_SELF_MANAGED` which requires API level 26.

## Features
The application is able to:
Expand Down

0 comments on commit 58980f3

Please sign in to comment.