Skip to content

Commit 41ac262

Browse files
committed
Add code
1 parent a2ec97a commit 41ac262

File tree

3 files changed

+115
-11
lines changed

3 files changed

+115
-11
lines changed

articles/communication-services/concepts/ui-library/includes/mobile-ui-use-cases.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ Consider the following constraints during the implementation of this feature:
103103
- Custom In-Call Actions: A business application can add a custom "Report Issue" button, allowing users to directly report technical issues during a call.
104104
- Branding and User Experience: An enterprise app can remove buttons that are irrelevant to its use case and add branded buttons that enhance the user experience.
105105

106+
To ensure a consistent call experience, , we recommend that you integrate Fluent UI icons into your project; available at [Fluent UI GitHub repository](https://github.com/microsoft/fluentui-system-icons/). By doing so, your custom icons will match the design of the Call Composite, creating a cohesive and professional appearance.
107+
106108
#### Best Practices
107109

108110
- Minimalism: Avoid overcrowding the contextual menu bar. Only add buttons that are essential for the user experience.

articles/communication-services/how-tos/ui-library-sdk/includes/button-injection/android.md

Lines changed: 86 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,113 @@ ms.service: azure-communication-services
1010

1111
## Remove buttons
1212

13-
Add description
13+
`CallCompositeCallScreenControlBarOptions`, allow the flexibility to customize the button bar by removing specific buttons such as camera, microphone, and audio controls. This API allows you to tailor the user interface according to their specific application requirements and user experience design. Just set the visbility to `false` to hide, the default behavior is for `CallCompositeButtonOptions` object.
1414

1515
#### [Kotlin](#tab/kotlin)
1616

1717
```kotlin
18-
TODO: Add code
18+
val controlBarOptions = CallCompositeCallScreenControlBarOptions()
19+
20+
val cameraButton = CallCompositeButtonOptions()
21+
.setVisible(false)
22+
23+
controlBarOptions.setCameraButton(cameraButton)
24+
25+
val callScreenOptions = CallCompositeCallScreenOptions()
26+
.setControlBarOptions(controlBarOptions)
27+
28+
val localOptions = CallCompositeLocalOptions()
29+
.setCallScreenOptions(callScreenOptions)
30+
31+
val callComposite = CallCompositeBuilder()
32+
.build()
33+
34+
callComposite.launch(context, locator, localOptions)
1935
```
2036

2137
#### [Java](#tab/java)
2238
```java
23-
TODO: Add code
39+
CallCompositeCallScreenControlBarOptions controlBarOptions = new CallCompositeCallScreenControlBarOptions();
40+
41+
CallCompositeButtonOptions cameraButton = new CallCompositeButtonOptions()
42+
.setVisible(false);
43+
44+
controlBarOptions.setCameraButton(cameraButton);
45+
46+
CallCompositeCallScreenOptions callScreenOptions = new CallCompositeCallScreenOptions()
47+
.setControlBarOptions(controlBarOptions);
48+
49+
CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
50+
.setCallScreenOptions(callScreenOptions);
51+
52+
CallComposite callComposite = new CallCompositeBuilder()
53+
.build();
54+
55+
callComposite.launch(context, locator, localOptions);
2456
```
2557

2658
-----
2759

2860
## Add custom actions
2961

30-
Add description
62+
`Call composite` is using Fluent UI icons, you can download the icons directly from [the Fluent UI GitHub repository](https://github.com/microsoft/fluentui-system-icons/) and incorporate them into your project as needed. This approach guarantees visual consistency across all user interface elements, enhancing the overall user experience.
3163

3264
#### [Kotlin](#tab/kotlin)
3365

3466
```kotlin
35-
TODO: Add code
67+
val controlBarOptions = CallCompositeCallScreenControlBarOptions()
68+
69+
controlBarOptions.setCustomButtons(
70+
listOf(
71+
CallCompositeCustomButtonOptions(
72+
R.drawable.my_button_image,
73+
"My button",
74+
fun(it: CallCompositeCustomButtonClickEvent) {
75+
// Process my button onClick
76+
},
77+
)
78+
)
79+
)
80+
81+
val callScreenOptions = CallCompositeCallScreenOptions()
82+
.setControlBarOptions(controlBarOptions)
83+
84+
val localOptions = CallCompositeLocalOptions()
85+
.setCallScreenOptions(callScreenOptions)
86+
87+
val callComposite = CallCompositeBuilder()
88+
.build()
89+
90+
callComposite.launch(context, locator, localOptions)
3691
```
3792

3893
#### [Java](#tab/java)
3994
```java
40-
TODO: Add code
95+
CallCompositeCallScreenControlBarOptions controlBarOptions = new CallCompositeCallScreenControlBarOptions();
96+
97+
List<CallCompositeCustomButtonOptions> customButtons = new ArrayList<>();
98+
customButtons.add(
99+
new CallCompositeCustomButtonOptions(
100+
R.drawable.my_button_image,
101+
"My button",
102+
eventArgs -> {
103+
// process my button onClick
104+
}
105+
)
106+
);
107+
108+
controlBarOptions.setCustomButtons(customButtons);
109+
110+
CallCompositeCallScreenOptions callScreenOptions = new CallCompositeCallScreenOptions()
111+
.setControlBarOptions(controlBarOptions);
112+
113+
CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
114+
.setCallScreenOptions(callScreenOptions);
115+
116+
CallComposite callComposite = new CallCompositeBuilder()
117+
.build();
118+
119+
callComposite.launch(context, locator, localOptions);
41120
```
42121

43-
-----
122+
-----

articles/communication-services/how-tos/ui-library-sdk/includes/button-injection/ios.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,39 @@ ms.service: azure-communication-services
1111

1212
## Remove buttons
1313

14-
Add description
14+
`CallScreenControlBarOptions`, allow the flexibility to customize the button bar by removing specific buttons such as camera, microphone, and audio controls. This API allows you to tailor the user interface according to their specific application requirements and user experience design. Just set the visbility to `false` to hide, the default behavior is for `ButtonOptions` object.
1515

1616
```swift
17-
TODO: Add code
17+
let cameraButton = ButtonOptions(visible: false)
18+
19+
let callScreenControlBarOptions = CallScreenControlBarOptions(
20+
cameraButton: cameraButton
21+
)
22+
23+
let callScreenOptions = CallScreenOptions(controlBarOptions: callScreenControlBarOptions)
24+
let localOptions = LocalOptions(callScreenOptions: callScreenOptions)
25+
26+
let callComposite = CallComposite(credential: credential)
27+
callComposite.launch(locator: .roomCall(roomId: "..."), localOptions: localOptions)
1828
```
1929

2030
## Add custom actions
2131

22-
Add description
32+
`Call composite` is using Fluent UI icons, you can download the icons directly from [the Fluent UI GitHub repository](https://github.com/microsoft/fluentui-system-icons/) and incorporate them into your project as needed. This approach guarantees visual consistency across all user interface elements, enhancing the overall user experience.
2333

2434
```swift
25-
TODO: Add code
35+
let customButton = CustomButtonOptions(image: UIImage(named: "...")!,
36+
title: "My button") {_ in
37+
// Process my button onClick
38+
}
39+
40+
let callScreenControlBarOptions = CallScreenControlBarOptions(
41+
customButtons: [customButton]
42+
)
43+
44+
let callScreenOptions = CallScreenOptions(controlBarOptions: callScreenControlBarOptions)
45+
let localOptions = LocalOptions(callScreenOptions: callScreenOptions)
46+
47+
let callComposite = CallComposite(credential: credential)
48+
callComposite.launch(locator: .roomCall(roomId: "..."), localOptions: localOptions)
2649
```

0 commit comments

Comments
 (0)