You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/calling-sdk/includes/install-sdk/install-sdk-android.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.author: rifox
8
8
9
9
## Install the SDK
10
10
11
-
Locate your project-level *build.gradle* file and add `mavenCentral()` to the list of repositories under `buildscript` and `allprojects`:
11
+
Locate your project-level `build.gradle` file and add `mavenCentral()` to the list of repositories under `buildscript` and `allprojects`:
12
12
13
13
```groovy
14
14
buildscript {
@@ -30,7 +30,7 @@ allprojects {
30
30
}
31
31
```
32
32
33
-
Then, in your module-level *build.gradle* file, add the following lines to the `dependencies` section:
33
+
Then, in your module-level `build.gradle` file, add the following lines to the `dependencies` section:
34
34
35
35
```groovy
36
36
dependencies {
@@ -40,7 +40,7 @@ dependencies {
40
40
}
41
41
```
42
42
43
-
###Initialize the required objects
43
+
## Initialize the required objects
44
44
45
45
To create a `CallAgent` instance, you have to call the `createCallAgent` method on a `CallClient` instance. This call asynchronously returns a `CallAgent` instance object.
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/calling-sdk/includes/install-sdk/install-sdk-ios.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.author: rifox
10
10
11
11
### Create the Xcode project
12
12
13
-
In Xcode, create a new iOS project and select the **Single View App** template. This quickstart uses the [SwiftUI framework](https://developer.apple.com/xcode/swiftui/), so you should set **Language** to **Swift** and set **Interface** to **SwiftUI**.
13
+
In Xcode, create a new iOS project and select the **Single View App** template. This article uses the [SwiftUI framework](https://developer.apple.com/xcode/swiftui/), so you should set **Language** to **Swift** and set **Interface** to **SwiftUI**.
14
14
15
-
You're not going to create tests during this quickstart. Feel free to clear the **Include Tests** checkbox.
15
+
You're not going to create tests in this article. Feel free to clear the **Include Tests** checkbox.
16
16
17
17
:::image type="content" source="../../../../quickstarts/voice-video-calling/media/ios/xcode-new-ios-project.png" alt-text="Screenshot that shows the window for creating a project within Xcode.":::
18
18
@@ -27,14 +27,16 @@ You're not going to create tests during this quickstart. Feel free to clear the
27
27
pod 'AzureCommunicationCalling', '~> 1.0.0'
28
28
end
29
29
```
30
+
30
31
2. Run `pod install`.
32
+
31
33
3. Open `.xcworkspace` by using Xcode.
32
34
33
35
### Request access to the microphone
34
36
35
37
To access the device's microphone, you need to update your app's information property list by using `NSMicrophoneUsageDescription`. You set the associated value to a string that will be included in the dialog that the system uses to request access from the user.
36
38
37
-
Right-click the *Info.plist* entry of the project tree, and then select **Open As** > **Source Code**. Add the following lines in the top-level `<dict>` section, and then save the file.
39
+
Right-click the **Info.plist** entry of the project tree, and then select **Open As** > **Source Code**. Add the following lines in the top-level `<dict>` section, and then save the file.
38
40
39
41
```xml
40
42
<key>NSMicrophoneUsageDescription</key>
@@ -43,14 +45,14 @@ Right-click the *Info.plist* entry of the project tree, and then select **Open A
43
45
44
46
### Set up the app framework
45
47
46
-
Open your project's *ContentView.swift* file. Add an `import` declaration to the top of the file to import the `AzureCommunicationCalling` library. In addition, import `AVFoundation`. You'll need it for audio permission requests in the code.
48
+
Open your project's `ContentView.swift` file. Add an `import` declaration to the top of the file to import the `AzureCommunicationCalling` library. In addition, import `AVFoundation`. You'll need it for audio permission requests in the code.
47
49
48
50
```swift
49
51
importAzureCommunicationCalling
50
52
importAVFoundation
51
53
```
52
54
53
-
## Initialize CallAgent
55
+
###Initialize CallAgent
54
56
55
57
To create a `CallAgent` instance from `CallClient`, you have to use a `callClient.createCallAgent` method that asynchronously returns a `CallAgent` object after it's initialized.
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/calling-sdk/includes/install-sdk/install-sdk-windows.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.author: jowang
9
9
10
10
### Create the Visual Studio project
11
11
12
-
For a UWP app, in Visual Studio 2022, create a new **Blank App (Universal Windows)** project. After you enter the project name, feel free to choose any Windows SDK later than 10.0.17763.0.
12
+
For a Universal Windows Platform (UWP) app, in Visual Studio 2022, create a new **Blank App (Universal Windows)** project. After you enter the project name, feel free to choose any Windows SDK later than 10.0.17763.0.
13
13
14
14
For a WinUI 3 app, create a new project with the **Blank App, Packaged (WinUI 3 in Desktop)** template to set up a single-page WinUI 3 app. [Windows App SDK version 1.3](/windows/apps/windows-app-sdk/stable-channel#version-13) or later is required.
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/calling-sdk/includes/push-notifications/push-notifications-android.md
+38-35Lines changed: 38 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,56 +5,56 @@ ms.topic: include
5
5
ms.date: 08/06/2024
6
6
ms.author: sanathr
7
7
---
8
-
> [!IMPORTANT]
9
-
> 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).
10
-
> Please follow this [migration guide](/azure/communication-services/tutorials/call-chat-migrate-android-push-fcm-v1) if your Communication reosurce is still using the old FCM legacy APIs.
### Additional Prerequisites for Push Notifications
9
+
- A Firebase account with Firebase Cloud Messaging (FCM) enabled and with your FCM service connected to an Azure Notification Hubs instance. For more information, see [Communication Services notifications](../../../../concepts/notifications.md).
10
+
- Android Studio version 3.6 or later to build your application.
11
+
- A set of permissions to enable the Android application to receive notification messages from FCM. In your `AndroidManifest.xml` file, add the following permissions right after `<manifest ...>` or below the `</application>` tag:
15
12
16
-
A Firebase account set up with Cloud Messaging (FCM) enabled and with your Firebase Cloud Messaging service connected to an Azure Notification Hub instance. See [Communication Services notifications](../../../../concepts/notifications.md) for more information.
17
-
Additionally, the tutorial assumes you're using Android Studio version 3.6 or higher to build your application.
A set of permissions is required for the Android application in order to be able to receive notifications messages from Firebase Cloud Messaging. In your `AndroidManifest.xml` file, add the following set of permissions right after the `<manifest ...>` or below the `</application>` tag.
19
+
> [!IMPORTANT]
20
+
> On June 20, 2023, Google announced that it [deprecated sending messages by using the FCM legacy APIs](https://firebase.google.com/docs/cloud-messaging) and would start 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).
21
+
>
22
+
> If your Communication Services resource is still using the FCM legacy APIs, follow [this migration guide](/azure/communication-services/tutorials/call-chat-migrate-android-push-fcm-v1).
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.
26
+
Mobile push notifications are the pop-up notifications that appear on mobile devices. For calling, this article focuses on voice over Internet Protocol (VoIP) push notifications.
29
27
30
28
> [!NOTE]
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.
29
+
> When the application registers for push notifications and handles the incoming push notifications for a Teams user, the APIs are the same. The APIs that this article describes can also be invoked on the `CommonCallAgent` or `TeamsCallAgent` class.
To register for push notifications, the application needs to call `registerPushNotification()` on a `CallAgent` instance with a device registration token.
35
+
To register for push notifications, the application needs to call `registerPushNotification()` on a `CallAgent` instance by using a device registration token.
36
36
37
-
To obtain the device registration token, add the Firebase SDK to your application module's `build.gradle` file by adding the following lines in the `dependencies` section if it's not already there:
37
+
To obtain the device registration token, add the Firebase SDK to your application module's `build.gradle` file by adding the following lines in the `dependencies` section (if the lines aren't already there):
In your project level's *build.gradle* file, add the following line 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:
46
46
47
47
```groovy
48
48
classpath 'com.google.gms:google-services:4.3.3'
49
49
```
50
50
51
-
Add the following plugin to the beginning of the file if it's not already there:
51
+
Add the following plug-in to the beginning of the file if it's not already there:
52
52
53
53
```groovy
54
54
apply plugin: 'com.google.gms.google-services'
55
55
```
56
56
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.
57
+
On the toolbar, select **Sync Now**. Add the following code snippet to get the device registration token that the Firebase Cloud Messaging SDK generated for the client application instance. Be sure to add the following imports to the header of the main activity for the instance to retrieve the token.
Register the device registration token with the Calling Services SDK for incoming call push notifications:
86
87
87
88
```java
@@ -94,19 +95,19 @@ catch(Exception e) {
94
95
}
95
96
```
96
97
97
-
## Push notification handling
98
+
## Handle push notifications
98
99
99
-
To receive incoming call push notifications, call *handlePushNotification()* on a *CallAgent* instance with a payload.
100
+
To receive incoming call push notifications, call `handlePushNotification()` on a `CallAgent` instance with a payload.
100
101
101
-
To obtain the payload from Firebase Cloud Messaging, begin by creating a new Service (File > New > Service > Service) that extends the *FirebaseMessagingService* Firebase SDK class and override the `onMessageReceived` method. This method is the event handler called when Firebase Cloud Messaging delivers the push notification to the application.
102
+
To obtain the payload from Firebase Cloud Messaging, begin by creating a new service (select **File** > **New** > **Service** > **Service**) that extends the `FirebaseMessagingService` Firebase SDK class and overrides the `onMessageReceived` method. This method is the event handler that's called when Firebase Cloud Messaging delivers the push notification to the application.
@@ -116,6 +117,7 @@ public class MyFirebaseMessagingService extends FirebaseMessagingService {
116
117
}
117
118
}
118
119
```
120
+
119
121
Add the following service definition to the `AndroidManifest.xml` file, inside the `<application>` tag:
120
122
121
123
```xml
@@ -128,7 +130,7 @@ Add the following service definition to the `AndroidManifest.xml` file, inside t
128
130
</service>
129
131
```
130
132
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.
133
+
After you retrieve the payload, you can pass it to the Communication Services SDK to be parsed into an internal `IncomingCallInformation` object. This object handles calling the `handlePushNotification` method on a `CallAgent` instance. You create a `CallAgent` instance by calling the `createCallAgent(...)` method on the `CallClient` class.
132
134
133
135
```java
134
136
try {
@@ -140,11 +142,11 @@ catch(Exception e) {
140
142
}
141
143
```
142
144
143
-
When the handling of the Push notification message is successful, and the all events handlers are registered properly, the application rings.
145
+
When the handling of the push notification message is successful, and the all event handlers are registered properly, the application rings.
144
146
145
147
## Unregister push notifications
146
148
147
-
Applications can unregister push notification at any time. Call the `unregisterPushNotification()` method on callAgent to unregister.
149
+
Applications can unregister push notification at any time. To unregister, call the `unregisterPushNotification()` method on `callAgent`:
148
150
149
151
```java
150
152
try {
@@ -155,13 +157,14 @@ catch(Exception e) {
155
157
}
156
158
```
157
159
158
-
## Disable internal push for incoming call
160
+
## Disable internal push notifications for an incoming call
161
+
162
+
The push payload of an incoming call can be delivered to the callee in two ways:
159
163
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.
164
+
- Using FCM and registering the device token with the API mentioned earlier, `registerPushNotification` on `CallAgent` or `TeamsCallAgent`
165
+
- Registering the SDK with an internal service upon creation of `CallAgent` or `TeamsCallAgent` to get the push payload delivered
163
166
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.
167
+
By using the property `setDisableInternalPushForIncomingCall` in `CallAgentOptions` or `TeamsCallAgentOptions`, it's possible to instruct the SDK to disable the delivery of the push payload via the internal push service:
0 commit comments