Skip to content

Commit ca47581

Browse files
Merge pull request #283753 from raosanat/master
Documentation update PR
2 parents 380b44a + 32e15a1 commit ca47581

File tree

6 files changed

+86
-31
lines changed

6 files changed

+86
-31
lines changed

articles/communication-services/concepts/voice-video-calling/known-issues-native.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,12 @@ ms.topic: conceptual
1111
ms.service: azure-communication-services
1212
---
1313

14-
# Known issues associated with the Azure Communication Services Calling Native and Native UI SDKs.
14+
# Known issues associated with the Azure Communication Services Calling Native and Native UI SDKs
1515
This article provides known issues related to using the Azure Communication Services native calling SDKs.
1616

1717
## Issues with Android API emulators
1818

19-
When utilizing Android API emulators on Android 5.0 (API level 21) and Android 5.1 (API level 22), some crashes are expected.
20-
21-
## Android chat and calling conflicts
22-
23-
You can't use Azure Communication Services chat and calling Android SDK at the same time, the chat real-time notifications feature doesn't work. You might get a dependency resolving issue.
24-
25-
To resolve this issue, you can turn off real-time notifications by adding the following dependency information in your app's build.gradle file and instead poll the GetMessages API to display incoming messages to end users.
26-
27-
**Java**
28-
```java
29-
implementation ("com.azure.android:azure-communication-chat:1.0.0") {
30-
exclude group: 'com.microsoft', module: 'trouter-client-android'
31-
}
32-
implementation 'com.azure.android:azure-communication-calling:1.0.0'
33-
```
34-
35-
> [!NOTE]
36-
> If your application uses the notification APIs like `chatAsyncClient.startRealtimeNotifications()` or `chatAsyncClient.addEventHandler()`, you will see a runtime error.
19+
When utilizing Android API emulators on Android 5.0 (API level 21) and Android 5.1 (API level 22), some crashes are expected.
3720

3821
## iOS ongoing video Picture in Picture (PiP)
3922

articles/communication-services/how-tos/calling-sdk/includes/push-notifications/push-notifications-android.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
author: probableprime
2+
author: sanathr
33
ms.service: azure-communication-services
44
ms.topic: include
5-
ms.date: 09/08/2021
6-
ms.author: rifox
5+
ms.date: 08/06/2024
6+
ms.author: sanathr
77
---
88
> [!IMPORTANT]
99
> On June 20, 2023, Google announced that it [deprecated sending messages using the FCM legacy APIs](https://firebase.google.com/docs/cloud-messaging). Google is removing the legacy FCM from service in June 2024. Google recommends [migrating from legacy FCM APIs to FCM HTTP v1](https://firebase.google.com/docs/cloud-messaging/migrate-v1).
@@ -25,10 +25,10 @@ A set of permissions is required for the Android application in order to be able
2525
```
2626

2727
## Overview
28-
Mobile push notifications are the pop-up notifications you see on mobile devices. For calling, we'll be focusing on VoIP (Voice over Internet Protocol) push notifications. We'll register for push notifications, handle push notifications, and then un-register push notifications.
28+
Mobile push notifications are the pop-up notifications you see on mobile devices. For calling, we'll be focusing on VoIP (Voice over Internet Protocol) push notifications. We register for push notifications, handle push notifications, and then unregister push notifications.
2929

3030
> [!NOTE]
31-
> To Register for Push Notifications and handling of the Push Notifications for a Custom Teams Endpoint (CTE) the API's are the same. The API's described below can also be invoked on the `CommonCallAgent` or `TeamsCallAgent` class for Custom Teams Endpoint (CTE).
31+
> Registering for Push Notifications and handling of the incoming Push Notifications for a Teams user, the APIs are the same. The APIs described here can also be invoked on the `CommonCallAgent` or `TeamsCallAgent` classes.
3232
3333
## Register for push notifications
3434

@@ -42,7 +42,7 @@ implementation 'com.google.firebase:firebase-core:16.0.8'
4242
implementation 'com.google.firebase:firebase-messaging:20.2.4'
4343
```
4444

45-
In your project level's *build.gradle* file, add the following in the `dependencies` section if it's not already there:
45+
In your project level's *build.gradle* file, add the following line in the `dependencies` section if it's not already there:
4646

4747
```groovy
4848
classpath 'com.google.gms:google-services:4.3.3'
@@ -54,7 +54,7 @@ Add the following plugin to the beginning of the file if it's not already there:
5454
apply plugin: 'com.google.gms.google-services'
5555
```
5656

57-
Select *Sync Now* in the toolbar. Add the following code snippet to get the device registration token generated by the Firebase Cloud Messaging SDK for the client application instance Be sure to add the below imports to the header of the main Activity for the instance. They're required for the snippet to retrieve the token:
57+
Select *Sync Now* in the toolbar. Add the following code snippet to get the device registration token generated by the Firebase Cloud Messaging SDK for the client application instance. Be sure to add the below imports to the header of the main Activity for the instance to retrieve the token.
5858

5959
```java
6060
import com.google.android.gms.tasks.OnCompleteListener;
@@ -128,7 +128,7 @@ Add the following service definition to the `AndroidManifest.xml` file, inside t
128128
</service>
129129
```
130130

131-
- Once the payload is retrieved, it can be passed to the *Communication Services* SDK to be parsed out into an internal *IncomingCallInformation* object that will be handled by calling the *handlePushNotification* method on a *CallAgent* instance. A `CallAgent` instance is created by calling the `createCallAgent(...)` method on the `CallClient` class.
131+
Once the payload is retrieved, it can be passed to the *Communication Services* SDK to be parsed out into an internal *IncomingCallInformation* object that will handle calling the *handlePushNotification* method on a *CallAgent* instance. A `CallAgent` instance is created by calling the `createCallAgent(...)` method on the `CallClient` class.
132132

133133
```java
134134
try {
@@ -140,7 +140,7 @@ catch(Exception e) {
140140
}
141141
```
142142

143-
When the handling of the Push notification message is successful, and the all events handlers are registered properly, the application will ring.
143+
When the handling of the Push notification message is successful, and the all events handlers are registered properly, the application rings.
144144

145145
## Unregister push notifications
146146

@@ -154,3 +154,16 @@ catch(Exception e) {
154154
System.out.println("Something went wrong while un-registering for all Incoming Calls Push Notifications.")
155155
}
156156
```
157+
158+
## Disable internal push for incoming call
159+
160+
There are two ways that a push payload of an incoming call can be delivered to the callee.
161+
- Using FCM and registering the device token with the API mentioned above, `registerPushNotification` on `CallAgent` or `TeamsCallAgent`.
162+
- When a `CallAgent` or `TeamsCallAgent` is created, SDK also registers with an internal service to get the push payload delivered.
163+
164+
Using the property `setDisableInternalPushForIncomingCall` in `CallAgentOptions` or `TeamsCallAgentOptions` it's possible to instruct the SDK to disable the delivery of the push payload using the internal push service.
165+
166+
```java
167+
CallAgentOptions callAgentOptions = new CallAgentOptions();
168+
callAgentOptions.setDisableInternalPushForIncomingCall(true);
169+
```

articles/communication-services/how-tos/calling-sdk/includes/push-notifications/push-notifications-ios.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.author: rifox
1111
Mobile push notifications are the pop-up notifications you see on mobile devices. For calling, we'll be focusing on VoIP (Voice over Internet Protocol) push notifications. We'll register for push notifications, handle push notifications, and then un-register push notifications. For a guide on CallKit integration in your iOS application, refer here, [CallKit integration with iOS ACS SDK](../../callkit-integration.md).
1212

1313
> [!NOTE]
14-
> To Register for Push Notifications and handling of the Push Notifications for a Custom Teams Endpoint (CTE) the APIs are the same. The APIs described can also be invoked on the `CommonCallAgent` or `TeamsCallAgent` class for Custom Teams Endpoint (CTE).
14+
> Registering for Push Notifications and handling of the incoming Push Notifications for a Teams user, the APIs are the same. The APIs described here can also be invoked on the `CommonCallAgent` or `TeamsCallAgent` classes.
1515
1616
## Set up push notifications
1717

@@ -72,3 +72,16 @@ callAgent.unregisterPushNotification { (error) in
7272
}
7373
}
7474
```
75+
76+
## Disable internal push for incoming call
77+
78+
There are 2 ways that a push payload of an incoming call can be delivered to the callee.
79+
- Using APNS and registering the device token with the API mentioned above, `registerPushNotification` on `CallAgent` or `TeamsCallAgent`.
80+
- When a `CallAgent` or `TeamsCallAgent` is created, SDK also registers with an internal service to get the push payload delivered.
81+
82+
Using the property `disableInternalPushForIncomingCall` in `CallAgentOptions` or `TeamsCallAgentOptions` it's possible to instruct the SDK to disable the delivery of the push payload using the internal push service.
83+
84+
```swift
85+
let options = CallAgentOptions()
86+
options.disableInternalPushForIncomingCall = true
87+
```

articles/communication-services/how-tos/calling-sdk/push-notifications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.date: 08/10/2021
1111
ms.custom: template-how-to
1212
zone_pivot_groups: acs-plat-web-ios-android-windows
1313

14-
#Customer intent: As a developer, I want to enable push notifications with the Azure Communication Services sdks so that I can create a calling application that provides push notifications to its users.
14+
#Customer intent: As a developer, I want to enable push notifications with the Azure Communication Services SDKs so that I can create a calling application that provides push notifications to its users.
1515
---
1616

1717
# Enable push notifications for calls
@@ -35,7 +35,7 @@ Once the register push notification API is called when the device token informat
3535
In case that you want to revoke an identity you need to follow [this process](../../concepts/identity-model.md#revoke-or-update-access-token), once the identity is revoked the Registrar entry should be deleted.
3636

3737
>[!Note]
38-
>For CTE (Custom Teams Endpoint) the max TTL value is **24 hrs (86,400 seconds)** there's no way to increase this value.
38+
>For a Teams user the max TTL value is **24 hrs (86,400 seconds)**. There's no way to increase this value. Contoso should wake up the application every 24 hours in the background and perform the registration of the device token. In iOS platform please follow the instructions [here](https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/using_background_tasks_to_update_your_app) and for Android [here](https://developer.android.com/develop/background-work/background-tasks) to wake up the application, fetch the new token and perform the registration.
3939
4040
## Prerequisites
4141

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
ms.date: 08/08/2024
3+
ms.topic: quickstart
4+
titleSuffix: Azure Communication Services Calling and Chat SDK
5+
author: sanathr
6+
title: Calling and Chat SDK in an Android application
7+
ms.author: sanathr
8+
ms.service: azure-communication-services
9+
description: How to use both Calling and Chat SDK together in an Android application.
10+
---
11+
# Add Calling and Chat SDK in an Android application
12+
13+
This tutorial describes how Contoso can integrate both Calling and Chat SDK in an Android application.
14+
15+
## Current limitation
16+
17+
With Android Calling SDK versions earlier than `2.11.0`, building an Android application with both the Calling and Chat SDK's resulted in the following errors:
18+
19+
```
20+
Duplicate class com.skype.rt.XXX found in modules jetified-azure-communication-calling-1.2.0-runtime (com.azure.android:azure-communication-calling:1.2.0) and jetified-trouter-client-android-0.1.1-runtime (com.microsoft:trouter-client-android:0.1.1)
21+
22+
2 files found with path 'lib/x86/libc++_shared.so' from inputs: - …\.gradle\...-azure-communication-calling-1.2.0\jni\x86\libc++_shared.so - …\.gradle\...-trouter-client-android-9.1.1\jni\x86\libc++_shared.so
23+
```
24+
25+
This issue was caused because of the conflicting `.jar` and `.so` files included in the Calling SDK package `com.azure.android:azure-communication-calling` and a transitive dependency package that the Chat SDK package `com.azure.android:azure-communication-chat` imports, `com.microsoft:trouter-client-android`.
26+
27+
## Solution
28+
From Android Calling SDK version 2.11.0 onwards, Contoso can integrate both the Calling and Chat SDKs within the same Android application. This was accomplished by making the Calling SDK rely on com.microsoft:trouter-client-android, similar to the Chat SDK’s dependency on the Trouter package, and eliminating the conflicting .jar and .so files previously included in the Calling SDK.
29+
30+
## Implementation steps
31+
32+
Specify the version of the Android Calling and Chat SDK in your application's Gradle build file as shown in the example:
33+
34+
```gradle
35+
implementation ('com.azure.android:azure-communication-calling:2.11.0')
36+
implementation ('com.azure.android:azure-communication-chat:2.0.3') {
37+
exclude group: 'com.microsoft', module: 'trouter-client-android'
38+
}
39+
```
40+
41+
The version of `com.azure.android:azure-communication-chat` can be any version. The latest release version is used here as an example. However, the version of the Trouter package `com.microsoft:trouter-client-android` included with the Chat SDK `com.azure.android:azure-communication-chat` needs to be excluded. When the application is built, the Trouter package version included by the Calling SDK package `com.azure.android:azure-communication-calling` will be used.
42+
43+
## Next steps
44+
Quickstart sample is available in GitHub [Android QuickStarts](https://github.com/Azure-Samples/communication-services-android-quickstarts.git) under `Add-Chat-Calling` folder and follow the `README.md` on instructions how to run the sample.

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ items:
289289
href: tutorials/building-app-start.md
290290
- name: Build an authentication service using Azure Functions
291291
href: tutorials/trusted-service-tutorial.md
292+
- name: Add Calling and Chat SDK in an Android application
293+
href: quickstarts/voice-video-calling/get-started-android-calling-chat-sdk.md
292294
- name: Adding audio quality enhancements
293295
items:
294296
- name: Enabling audio effects

0 commit comments

Comments
 (0)