Skip to content

Commit fe19017

Browse files
authored
Merge pull request #231934 from Mohtasim/how-to/bypass-setup-screen
Guide to use Skip Setup Screen feature for public preview 1.3.0 GA
2 parents 7bb2ccf + dd473a7 commit fe19017

File tree

11 files changed

+269
-22
lines changed

11 files changed

+269
-22
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ Use the UI Library for mobile native platforms to give local and remote particip
7777

7878
:::image type="content" source="../../media/mobile-ui/ios-composite.gif" alt-text="GIF animation that shows the pre-meeting experience and joining experience on iOS.":::
7979

80+
### Skip Setup Screen
81+
82+
UI Library provides the capability to join a call skipping the setup screen of the call join experience. By default, user goes through a setup screen to join a call. Here, user sets the call configuration such as camera turn on or off, microphone turn on or off and audio device selection before joining a call. This screen requires user interaction to join a call, which might be unnecessary for some users. So we provide the capability to join a call by skipping the setup screen and providing the call configuration APIs. For more information, see [How to use Skip Setup Screen Feature](../../../how-tos/ui-library-sdk/skip-setup-screen.md)
83+
8084
## Chat use cases
8185

8286
[!INCLUDE [Public Preview Notice](../../../includes/public-preview-include.md)]

articles/communication-services/how-tos/ui-library-sdk/includes/data-model/android.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ ms.service: azure-communication-services
1010

1111
Azure Communication UI [open source library](https://github.com/Azure/communication-ui-library-android) for Android and the sample application code can be found [here](https://github.com/Azure-Samples/communication-services-android-quickstarts/tree/main/ui-calling)
1212

13-
### Participant View Customization
13+
### Local Participant View Customization
1414

1515
The UI Library gives developers the ability to provide a more customized experience regarding Participant information. At launch, developers can optionally inject local participant data. This local data isn't shared with the server and can be used to customize the display name and avatar of the local user.
1616

1717
#### Local Options
1818

19-
`CallCompositeLocalOptions` is the data model that can have `CallCompositeParticipantViewData` and `CallCompositeSetupScreenViewData`. It will represent the local participant. By default, for remote participants, the UI library will display the `displayName` injected in `RemoteOptions` that is sent to Azure Communication Service backend server. If `CallCompositeParticipantViewData` is injected, the participant `displayName` and `avatar` will be displayed in all avatar components locally and only in user's side.
19+
`CallCompositeLocalOptions` is the data model that can have `CallCompositeParticipantViewData` and `CallCompositeSetupScreenViewData`. It represents the local participant. By default, for remote participants, the UI library displays the `displayName` injected in `RemoteOptions` that is sent to Azure Communication Service backend server. If `CallCompositeParticipantViewData` is injected, the participant `displayName` and `avatar` are displayed in all avatar components locally.
2020

21-
Similarly, for `CallCompositeSetupScreenViewData`, the `title` and `subtitle` in `CallCompositeSetupScreenViewData` would overwrite the navigation bar's title and subtitle in pre-meeting screen respectively. By default, the UI library will display 'Setup' as the title and subtitle will be set to hidden.
21+
Similarly, for `CallCompositeSetupScreenViewData`, the `title` and `subtitle` in `CallCompositeSetupScreenViewData` overwrites the navigation bar's title and subtitle in premeeting screen respectively. By default, the UI library displays 'Setup' as the title and nothing as the subtitle.
2222

2323
#### Local Participant View Data
2424

@@ -30,7 +30,7 @@ This class is held in the `CallCompositeLocalOptions` object that represents opt
3030

3131
#### Setup Screen View Data
3232

33-
`CallCompositeSetupScreenViewData` is an object that sets the `title` and `subtitle` for the navigationBar on call setup screen. If `subtitle` is not defined, then subtitle would always be set to hidden. Here `title` is a required to set the `subtitle` but `subtitle` is optional when `title` is set. This class is locally stored and its information will not be sent up to the server.
33+
`CallCompositeSetupScreenViewData` is an object that sets the `title` and `subtitle` for the navigationBar on call setup screen. If `subtitle` isn't defined, then subtitle is hidden. Here `title` is a required to set the `subtitle` but `subtitle` is optional when `title` is set. This class is locally stored and its information aren't sent up to the server.
3434

3535
#### Usage
3636

@@ -39,20 +39,20 @@ To use the `CallCompositeLocalOptions`, pass the instance of `CallCompositeParti
3939
#### [Kotlin](#tab/kotlin)
4040

4141
```kotlin
42-
val CallCompositeParticipantViewData participantViewData = CallCompositeParticipantViewData()
42+
val participantViewData: CallCompositeParticipantViewData = CallCompositeParticipantViewData()
4343
.setAvatarBitmap((Bitmap) avatarBitmap)
4444
.setScaleType((ImageView.ScaleType) scaleType)
45-
.setDisplayName((String) displayName);
45+
.setDisplayName((String) displayName)
4646

47-
val CallCompositeSetupScreenViewData setupScreenViewData = CallCompositeSetupScreenViewData()
47+
val setupScreenViewData: CallCompositeSetupScreenViewData = CallCompositeSetupScreenViewData()
4848
.setTitle((String) title)
49-
.setSubtitle((String) subTitle);
49+
.setSubtitle((String) subTitle)
5050

51-
val CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
51+
val localOptions: CallCompositeLocalOptions = CallCompositeLocalOptions()
5252
.setParticipantViewData(participantViewData)
53-
.setNavigationBarViewData(navigationBarViewData);
53+
.setSetupScreenViewData(setupScreenViewData)
5454

55-
callComposite.launch(callLauncherActivity, remoteOptions, localOptions);
55+
callComposite.launch(callLauncherActivity, remoteOptions, localOptions)
5656
```
5757

5858
#### [Java](#tab/java)
@@ -69,7 +69,7 @@ final CallCompositeSetupScreenViewData setupScreenViewData = new CallCompositeSe
6969

7070
final CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
7171
.setParticipantViewData(participantViewData)
72-
.setNavigationBarViewData(navigationBarViewData);
72+
.setSetupScreenViewData(setupScreenViewData);
7373

7474
callComposite.launch(callLauncherActivity, remoteOptions, localOptions);
7575
```
@@ -121,4 +121,4 @@ callComposite.addOnRemoteParticipantJoinedEventHandler { remoteParticipantJoined
121121

122122
|Participants list|
123123
| ---- |
124-
| :::image type="content" source="media/android-model-injection-remote.png" alt-text="Screenshot showing the Android data custom model remote injection."::: |
124+
| :::image type="content" source="media/android-model-injection-remote.png" alt-text="Screenshot of the Android remote participants view data injection."::: |

articles/communication-services/how-tos/ui-library-sdk/includes/data-model/ios.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ Azure Communication UI [open source library](https://github.com/Azure/communicat
1212

1313
### Local Participant View Data Injection
1414

15-
The UI Library now gives developers the ability to provide a more customized experience. At launch, developers can now inject an optional Local Data Options. This object can contain a UIimage that represents the avatar to render, and a display name they can optionally display instead. None of this information will be sent to Azure Communication Services and will be only held locally in the UI library.
15+
The UI Library now gives developers the ability to provide a more customized experience. At launch, developers can now inject an optional Local Data Options. This object can contain a UIimage that represents the avatar to render, and a display name they can optionally display instead. None of this information is sent to Azure Communication Services and is held locally in the UI library.
1616

1717
#### Local Options
1818

19-
`LocalOptions` is data model that consists of `ParticipantViewData` and `SetupScreenViewData`. By default for `ParticipantViewData`, the UI library displays the `displayName` injected in `RemoteOptions` that is sent to Azure Communication Service backend server. If `ParticipantViewData` is injected, the participant `displayName` and `avatar` will be displayed in all avatar components.
19+
`LocalOptions` is data model that consists of `ParticipantViewData` and `SetupScreenViewData`. By default for `ParticipantViewData`, the UI library displays the `displayName` injected in `RemoteOptions` that is sent to Azure Communication Service backend server. If `ParticipantViewData` is injected, the participant `displayName` and `avatar` are displayed in all avatar components.
2020

21-
Similarly, for 'SetupScreenViewData', by default the UI library displays 'Setup' as the title and subtitle is set to hidden. The `title` and `subtitle` in 'SetupScreenViewData' would overwrite the navigation bar's title and subtitle in pre-meeting screen respectively.
21+
Similarly, for 'SetupScreenViewData', by default, the UI library displays 'Setup' as the title and nothing as subtitle. The `title` and `subtitle` in 'SetupScreenViewData' overwrites the navigation bar's title and subtitle in premeeting screen respectively.
2222

23-
#### Participant View Data
23+
#### Local Participant View Data
2424

25-
`ParticipantViewData` is an object that sets the `displayName` and `avatar` UIImage for avatar components. This class is injected into the UI Library to set avatar information, and it will always be locally stored and never sent up to the server.
25+
`ParticipantViewData` is an object that sets the `displayName` and `avatar` UIImage for avatar components. This class is injected into the UI Library to set avatar information. It's stored locally and never sent up to the server.
2626

2727
#### Setup Screen View Data
2828

29-
`SetupScreenViewData` is an object that sets the `title` and `subtitle` for the navigationBar on pre-meeting screen (also known as Setup View). If `SetupScreenViewData` is defined, then 'title' must be provided as it's a required field. 'subtitle', however, isn't required.
30-
If `subtitle` isn't defined, then the subtitle would always be set to hidden. This class is locally stored and its information won't be sent up to the server.
29+
`SetupScreenViewData` is an object that sets the `title` and `subtitle` for the navigationBar on premeeting screen (also known as Setup View). If `SetupScreenViewData` is defined, then 'title' must be provided as it's a required field. 'subtitle', however, isn't required.
30+
If `subtitle` isn't defined, then it's hidden. This class is locally stored and its information isn't sent up to the server.
3131

3232
#### Usage
3333

@@ -53,7 +53,7 @@ callComposite.launch(remoteOptions: remoteOptions, localOptions: localOptions)
5353

5454
### Remote Participant View Data Injection
5555

56-
On remote participant join, developers can inject the participant view data for remote participant. This participant view data can contain a UIImage that represents the avatar to render, and a display name they can optionally display instead. None of this information will be sent to Azure Communication Services and will be only held locally in the UI library.
56+
On remote participant join, developers can inject the participant view data for remote participant. This participant view data can contain a UIImage that represents the avatar to render, and a display name they can optionally display instead. None of this information is sent to Azure Communication Services and is held locally in the UI library.
5757

5858
#### Usage
5959

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
description: In this tutorial, you learn how to use the Calling composite on Android
3+
author: mbellah
4+
5+
ms.author: mbellah
6+
ms.date: 03/21/2023
7+
ms.topic: include
8+
ms.service: azure-communication-services
9+
---
10+
11+
Azure Communication UI [open source library](https://github.com/Azure/communication-ui-library-android) for Android and the sample application code can be found [here](https://github.com/Azure-Samples/communication-services-android-quickstarts/tree/main/ui-calling)
12+
13+
14+
### Skip setup screen option
15+
16+
`CallCompositeLocalOptions` is an options wrapper that sets the capability of the UI Library to skip the setup screen using a boolean. By default, the skip setup screen capability is set to false. You have to set `skipSetupScreen` with true boolean value to get the skip setup screen experience.
17+
18+
We recommend you to build your application such a way that when user tries to join a call, microphone permission has already been granted to get a smooth call join experience.
19+
20+
:::image type="content" source="media/android-bypass-setup-screen.png" alt-text="Diagram of joining call skipping the setup screen for Android.":::
21+
22+
23+
To use the feature, pass the boolean value with `skipSetupScreen` to `CallCompositeLocalOptions` and inject it to `callComposite.launch`.
24+
25+
### [Kotlin](#tab/kotlin)
26+
27+
```kotlin
28+
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions
29+
30+
val localOptions: CallCompositeLocalOptions = CallCompositeLocalOptions()
31+
.setSkipSetupScreen(true)
32+
33+
callComposite.launch(callLauncherActivity, remoteOptions, localOptions)
34+
```
35+
36+
### [Java](#tab/java)
37+
```java
38+
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions;
39+
40+
final CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
41+
.setSkipSetupScreen(true);
42+
43+
callComposite.launch(callLauncherActivity, remoteOptions, localOptions);
44+
```
45+
-----
46+
47+
### Default camera and microphone configuration options
48+
49+
By default, setup screen gives the user an option to configure the camera and microphone settings before joining a call. When you try to skip the setup screen to join a call, user doesn't have that option unless they join the call already. We're providing more options to set default behavior of the camera and microphone so that developers get more control over default state of camera and microphone. You can pass a boolean value with `cameraOn` and `microphoneOn` to turn camera and microphone ON or OFF. These attributes empower developers to have control over camera and microphone controls prior to join a call. Default camera and microphone state control functionality isn't affected if user grants the permission for each of them respectively.
50+
51+
By default, both `cameraOn` and `microphoneOn` are set to false. You can use this functionality even with UI Libraries default call join experience. In that case, setup screen camera and microphone are turned ON or OFF according to the configuration that you set.
52+
53+
To use camera and microphone default state feature, pass the boolean value with
54+
`cameraOn` and `microphoneOn` to `CallCompositeLocalOptions` and inject it to `callComposite.launch`.
55+
56+
### [Kotlin](#tab/kotlin)
57+
58+
```kotlin
59+
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions
60+
61+
val localOptions: CallCompositeLocalOptions = CallCompositeLocalOptions()
62+
.setMicrophoneOn(true)
63+
.setCameraOn(true)
64+
65+
callComposite.launch(callLauncherActivity, remoteOptions, localOptions)
66+
```
67+
68+
### [Java](#tab/java)
69+
70+
```java
71+
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions;
72+
73+
final CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
74+
.setMicrophoneOn(true)
75+
.setCameraOn(true);
76+
77+
callComposite.launch(callLauncherActivity, remoteOptions, localOptions);
78+
```
79+
-----
80+
81+
### Permission handling
82+
83+
It's recommended to let the users join a call with microphone and camera permission being granted to use the skip setup screen feature with camera and microphone default configuration APIs. However, if developers don't handle the permissions of the user, UI Library tries to handle them for you.
84+
85+
Microphone permission is a must have to join a call. If users try to join a call with denied microphone permission, UI Library drops the call in connecting stage and may throw an error with code `CallCompositeErrorCode.MICROPHONE_PERMISSION_NOT_GRANTED`.
86+
On the other hand, users are able to join a call even if they deny the camera permission. UI Library disables the camera functionality when camera permission is set as denied. Thus the camera default configuration API doesn't affect the calling experience. User may enjoy default camera configuration API effect once the camera permission is set as granted.
87+
88+
We recommend, developers handle the microphone permission. If user joins the call with camera turned on default, we recommend developers to handle the camera permission as well.
89+
90+
### Network error
91+
92+
If network disruption happens or call drops during a call, UI Library exits and may throw an error with code `CallCompositeErrorCode.CALL_END_FAILED`. If user doesn't have network connection prior to join a call and tries to join the call with skip setup screen feature, UI Library exits at call connecting stage and may throw an error with code `CallCompositeErrorCode.NETWORK_CONNECTION_NOT_AVAILABLE`.
93+
94+
It's recommended to join the call by checking network availability to avoid such error.
95+
96+
To receive error events, call `setOnErrorHandler` with `CallComposite`.
97+
98+
The following `error` values might be sent to the error handler:
99+
- `microphonePermissionNotGranted`
100+
- `networkConnectionNotAvailable`
101+
102+
### [Kotlin](#tab/kotlin)
103+
104+
```kotlin
105+
callComposite.addOnErrorEventHandler { callCompositeErrorEvent ->
106+
println(callCompositeErrorEvent.errorCode)
107+
}
108+
```
109+
110+
### [Java](#tab/java)
111+
112+
```java
113+
callComposite.addOnErrorEventHandler(callCompositeErrorEvent -> {
114+
System.out.println(callCompositeErrorEvent.getErrorCode());
115+
});
116+
```
117+
-----
118+
119+

0 commit comments

Comments
 (0)