Skip to content

Commit c2e6625

Browse files
committed
events and raise hand
1 parent 5c900a9 commit c2e6625

File tree

9 files changed

+227
-150
lines changed

9 files changed

+227
-150
lines changed

articles/communication-services/how-tos/calling-sdk/events.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: Subscribe to SDK events
3-
titleSuffix: An Azure Communication Services how-to guide
3+
titleSuffix: An Azure Communication Services article
44
description: Use Azure Communication Services SDKs to subscribe to SDK events.
55
author: tophpalmer
66
ms.author: chpalm
77
ms.service: azure-communication-services
88
ms.subservice: calling
99
ms.topic: how-to
10-
ms.date: 08/10/2021
10+
ms.date: 06/15/2025
1111
ms.custom: template-how-to
1212
zone_pivot_groups: acs-plat-web-ios-android
1313

@@ -16,7 +16,7 @@ zone_pivot_groups: acs-plat-web-ios-android
1616

1717
# Subscribe to SDK events
1818

19-
Azure Communication Services SDKs are dynamic and contain a lot of properties. When these change, as a developer you might want to know when and more importantly what changes. Here's how!
19+
We recommend subscribing to Calling SDK Events. Azure Communication Services SDKs are dynamic and contain properties that might change over time. You can subscribe to these events to be notified in advance of any changes. Follow the instructions in this article to subscribe to Azure Communication Services SDK events.
2020

2121
::: zone pivot="platform-web"
2222
[!INCLUDE [Events JavaScript](./includes/events/events-web.md)]
@@ -31,6 +31,7 @@ Azure Communication Services SDKs are dynamic and contain a lot of properties. W
3131
::: zone-end
3232

3333
## Next steps
34+
3435
- [Try our calling quickstart](../../quickstarts/voice-video-calling/getting-started-with-calling.md)
3536
- [Try our video calling quickstart](../../quickstarts/voice-video-calling/get-started-with-video-calling.md)
3637
- [Learn how to enable push notifications](./push-notifications.md)

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
author: probableprime
33
ms.service: azure-communication-services
44
ms.topic: include
5-
ms.date: 09/08/2021
6-
ms.author: rifox
5+
ms.date: 06/15/2025
6+
ms.author: micahvivion
77
---
88
[!INCLUDE [Install SDK](../install-sdk/install-sdk-android.md)]
99

10-
With our Android SDK, you can subscribe to most of the properties and collections to be notified when values change.
10+
Now that you installed Android SDK, you can subscribe to most of the properties and collections to be notified when values change.
1111

1212
## Properties
13+
1314
To subscribe to `property changed` events:
1415

1516
```java
@@ -27,10 +28,10 @@ call.addOnStateChangedListener(callStateChangeListener);
2728
//unsubscribe
2829
call.removeOnStateChangedListener(callStateChangeListener);
2930
```
30-
When you use event listeners that are defined within the same class, bind the listener to a variable. Pass the variable in as an argument to add and remove listener methods.
3131

32-
If you try to pass the listener in directly as an argument, you'll lose the reference to that listener. Java is creating new instances of these listeners and not referencing previously created ones. They'll still fire off properly but can’t be removed because you won’t have a reference to them anymore.
32+
When you use event listeners that are defined within the same class, bind the listener to a variable. To add and remove listener methods, pass the variable in as an argument.
3333

34+
If you try to pass the listener in directly as an argument, you lose the reference to that listener. Java is creating new instances of these listeners and not referencing previously created ones. They still fire off properly but can’t be removed because you don’t have a reference to them anymore.
3435

3536
## Collections
3637
To subscribe to `collection updated` events:

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
author: probableprime
33
ms.service: azure-communication-services
44
ms.topic: include
5-
ms.date: 09/08/2021
6-
ms.author: rifox
5+
ms.date: 06/15/2025
6+
ms.author: micahvivion
77
---
88
[!INCLUDE [Install SDK](../install-sdk/install-sdk-ios.md)]
99

10-
With our iOS SDK, You can subscribe to most of the properties and collections to be notified when values change.
10+
Now that you installed the iOS SDK, you can subscribe to most of the properties and collections to be notified when values change.
1111

1212
## Properties
13+
1314
To subscribe to `property changed` events, use the following code.
1415

1516
```swift
@@ -25,6 +26,7 @@ self.call.delegate = nil
2526
```
2627

2728
## Collections
29+
2830
To subscribe to `collection updated` events, use the following code.
2931

3032
```swift

articles/communication-services/how-tos/calling-sdk/includes/events/events-web.md

Lines changed: 75 additions & 64 deletions
Large diffs are not rendered by default.

articles/communication-services/how-tos/calling-sdk/includes/raise-hand/raise-hand-android.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
author: ruslanzdor
33
ms.service: azure-communication-services
44
ms.topic: include
5-
ms.date: 11/01/2022
6-
ms.author: ruslanzdor
5+
ms.date: 06/15/2025
6+
ms.author: chpalm
77
---
88
[!INCLUDE [Install SDK](../install-sdk/install-sdk-android.md)]
99

10-
The Raise Hand feature allows participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. This feature can be used in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11-
You first need to import calling Features from the Calling SDK:
10+
The Raise Hand feature enables participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. You can use this feature in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11+
12+
First you need to import calling Features from the Calling SDK:
1213

1314
```java
1415
import com.azure.android.communication.calling.RaiseHandFeature;
@@ -20,9 +21,12 @@ Then you can get the feature API object from the call instance:
2021
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND);
2122
```
2223

23-
### Raise and lower hand for current participant:
24+
### Raise and lower hand for current participant
25+
2426
To change the Raise Hand state for the current participant, you can use the `raiseHand()` and `lowerHand()` methods.
25-
This is async methods, to verify results can be used `RaisedHandReceived` and `LoweredHandReceived` listeners.
27+
28+
These methods are async. To verify results, use `RaisedHandReceived` and `LoweredHandReceived` listeners.
29+
2630
```java
2731
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND);
2832
//raise
@@ -32,9 +36,11 @@ raiseHandFeature.lowerHand();
3236
```
3337

3438
### Lower hands for other participants
35-
This feature allows users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, changing the state of other participants is not allowed unless roles have been added.
3639

37-
To use this feature, you can use the following code:
40+
This feature enables users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, you can't change the state of other participants unless adding the roles first.
41+
42+
To use this feature, implement the following code:
43+
3844
```java
3945
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND);
4046
//lower all hands on the call
@@ -49,9 +55,11 @@ raiseHandFeature.lowerHands(identifiers);
4955
```
5056

5157
### Handle changed states
52-
With the Raise Hand API, you can subscribe to the `RaisedHandReceived` and `LoweredHandReceived` events to handle changes in the state of participants on a call. These events are triggered by a call instance and provide information about the participant whose state has changed.
5358

54-
To subscribe to these events, you can use the following code:
59+
Using the Raise Hand API, you can subscribe to the `RaisedHandReceived` and `LoweredHandReceived` events to handle changes in the state of participants on a call. The call instance triggers these events and provides information about the participant whose state changed.
60+
61+
To subscribe to these events, use the following code:
62+
5563
```java
5664
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND)
5765

@@ -60,21 +68,28 @@ call.feature(Features.RAISE_HAND).addOnRaisedHandReceivedListener(raiseHandEvent
6068
Log.i(TAG, String.format("Raise Hand: %s : %s", Utilities.toMRI(raiseHandEvent.getIdentifier()), raiseHandEvent.isRaised()));
6169
});
6270
```
63-
The `RaisedHandReceived` and `LoweredHandReceived` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the example above, we log a message to the console indicating that a participant has raised their hand.
71+
72+
The `RaisedHandReceived` and `LoweredHandReceived` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the preceding example, we log a message to the console indicating that a participant raised their hand.
6473

6574
To unsubscribe from the events, you can use the `off` method.
6675

6776

6877
### List of all participants with active state
69-
To get information about all participants that have raised hand state on current call, you can use the `getRaisedHands` api. he returned array is sorted by the order field.
70-
Here's an example of how to use the `getRaisedHands` API:
78+
79+
To get information about all participants with raised hand state on current call, you can use `getRaisedHands`. The returned array is sorted by the order field.
80+
81+
Here's an example of how to use `getRaisedHands`:
82+
7183
```java
7284
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND);
7385
List<RaiseHand> participantsWithRaisedHands = raiseHandFeature.getRaisedHands();
7486
```
7587

7688
### Order of raised Hands
77-
The `participantsWithRaisedHands` variable will contain an array of participant objects, where each object has the following properties:
78-
`identifier`: the communication identifier of the participant
79-
`order`: the order in which the participant raised their hand
80-
You can use this information to display a list of participants with the Raise Hand state and their order in the queue.```
89+
90+
The `participantsWithRaisedHands` variable contains an array of participant objects, where each object has the following properties:
91+
92+
- `identifier`: the communication identifier of the participant.
93+
- `order`: the order in which the participant raised their hand.
94+
-
95+
You can use this information to display a list of participants with the Raise Hand state and their order in the queue.

articles/communication-services/how-tos/calling-sdk/includes/raise-hand/raise-hand-ios.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
author: ruslanzdor
33
ms.service: azure-communication-services
44
ms.topic: include
5-
ms.date: 02/06/2022
6-
ms.author: ruslanzdor
5+
ms.date: 06/15/2025
6+
ms.author: chpalm
77
---
88
[!INCLUDE [Install SDK](../install-sdk/install-sdk-ios.md)]
99

10-
The Raise Hand feature allows participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. This feature can be used in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11-
You first need to import calling Features from the Calling SDK:
10+
The Raise Hand feature enables participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. You can use this feature in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11+
12+
First you need to import calling Features from the Calling SDK:
1213

1314
```swift
1415
import AzureCommunicationCalling
@@ -22,8 +23,10 @@ Then you can get the feature API object from the call instance:
2223
raiseHandFeature = self.call!.feature(Features.raiseHand)
2324
```
2425

25-
### Raise and lower hand for current participant:
26+
### Raise and lower hand for current participant
27+
2628
To change the Raise Hand state for the current participant, you can use the `raiseHand()` and `lowerHand()` methods.
29+
2730
```swift
2831
//publish raise hand state for local participant
2932
raisehandFeature.raiseHand(completionHandler: { (error) in
@@ -42,9 +45,11 @@ raisehandFeature.lowerHand(completionHandler: { (error) in
4245
```
4346

4447
### Lower hands for other participants
45-
This feature allows users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, changing the state of other participants is not allowed unless roles have been added.
4648

47-
To use this feature, you can use the following code:
49+
This feature enables users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, you can't change the state of other participants unless adding the roles first.
50+
51+
To use this feature, implement the following code:
52+
4853
```swift
4954

5055
// remove raise hand states for all participants on the call
@@ -74,9 +79,11 @@ raisehandFeature.lowerHands(participants: identifiers, completionHandler: { (err
7479
```
7580

7681
### Handle changed states
77-
With the Raise Hand API, you can subscribe to the `RaisedHandReceived` and `LoweredHandReceived` events to handle changes in the state of participants on a call. These events are triggered by a call instance and provide information about the participant whose state has changed.
7882

79-
To subscribe to these events, you can use the following code:
83+
With the Raise Hand API, you can subscribe to the `RaisedHandReceived` and `LoweredHandReceived` events to handle changes in the state of participants on a call. The call instance triggers these events and provides information about the participant whose state changed.
84+
85+
To subscribe to these events, use the following code:
86+
8087
```swift
8188
self.callObserver = CallObserver(view:self)
8289

@@ -100,14 +107,18 @@ public class CallObserver : NSObject, RaiseHandCallFeatureDelegate
100107
}
101108
}
102109
```
103-
The `RaisedHandReceived` and `LoweredHandReceived` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the example above, we log a message to the console indicating that a participant has raised their hand.
104110

105-
To unsubscribe from the events, you can use the `off` method.
111+
The `RaisedHandReceived` and `LoweredHandReceived` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the preceding example, we log a message to the console indicating that a participant raised their hand.
112+
113+
To unsubscribe from the events, use the `off` method.
106114

107115

108116
### List of all participants with active state
109-
To get information about all participants that have raised hand state on current call, you can use the `getRaisedHands` api. he returned array is sorted by the order field.
110-
Here's an example of how to use the `raisedHands` API:
117+
118+
To get information about all participants with raised hand state on current call, you can use `getRaisedHands`. The returned array is sorted by the order field.
119+
120+
Here's an example of how to use `raisedHands`:
121+
111122
```swift
112123
raisehandFeature = self.call!.feature(Features.raiseHand)
113124
raisehandFeature.raisedHands.forEach { raiseHand in
@@ -116,7 +127,10 @@ raisehandFeature.raisedHands.forEach { raiseHand in
116127
```
117128

118129
### Order of raised Hands
119-
The `raisedHands` variable will contain an array of participant objects, where each object has the following properties:
120-
`identifier`: the communication identifier of the participant
121-
`order`: the order in which the participant raised their hand
122-
You can use this information to display a list of participants with the Raise Hand state and their order in the queue.```
130+
131+
The `raisedHands` variable contains an array of participant objects, where each object has the following properties:
132+
133+
- `identifier`: the communication identifier of the participant.
134+
- `order`: the order in which the participant raised their hand.
135+
136+
You can use this information to display a list of participants with the Raise Hand state and their order in the queue.

0 commit comments

Comments
 (0)