Skip to content

Commit be92c21

Browse files
authored
Merge pull request #262149 from ShawnJackson/communication-services-how-tos-batch2
[AQ] edit pass: Communication Services how-to articles (batch 2)
2 parents 4abfec6 + 7950d9e commit be92c21

6 files changed

Lines changed: 111 additions & 101 deletions

File tree

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: In this tutorial, you learn how to use the Calling composite on Android.
2+
description: Learn how to use the Calling composite on Android.
33
author: mbellah
44

55
ms.author: mbellah
@@ -8,37 +8,37 @@ ms.topic: include
88
ms.service: azure-communication-services
99
---
1010

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)
11+
For more information, see the [open-source Android UI Library](https://github.com/Azure/communication-ui-library-android) and the [sample application code](https://github.com/Azure-Samples/communication-services-android-quickstarts/tree/main/ui-calling).
1212

1313
### Available orientations
1414

15-
The following is a table of `CallCompositeSupportedScreenOrientation` with out of the box orientations. If you want to set orientation of the different screens of the composite, set the `CallCompositeSupportedScreenOrientation` into `CallComposite`.
15+
The following table lists `CallCompositeSupportedScreenOrientation` types for out-of-the-box orientations. If you want to set the orientation of the various screens of the composite, set `CallCompositeSupportedScreenOrientation` to `CallComposite`.
1616

17-
|Orientation Mode| CallCompositeSupportedScreenOrientation|
17+
|Orientation mode| CallCompositeSupportedScreenOrientation type|
1818
|---------|---------|
19-
|PORTRAIT | CallCompositeSupportedScreenOrientation.PORTRAIT|
20-
|LANDSCAPE | CallCompositeSupportedScreenOrientation.LANDSCAPE|
21-
|REVERSE_LANDSCAPE | CallCompositeSupportedScreenOrientation.REVERSE_LANDSCAPE|
22-
|USER_LANDSCAPE | CallCompositeSupportedScreenOrientation.USER_LANDSCAPE|
23-
|FULL_SENSOR | CallCompositeSupportedScreenOrientation.FULL_SENSOR|
24-
|USER | CallCompositeSupportedScreenOrientation.USER|
19+
|`PORTRAIT` | `CallCompositeSupportedScreenOrientation.PORTRAIT`|
20+
|`LANDSCAPE` | `CallCompositeSupportedScreenOrientation.LANDSCAPE`|
21+
|`REVERSE_LANDSCAPE` | `CallCompositeSupportedScreenOrientation.REVERSE_LANDSCAPE`|
22+
|`USER_LANDSCAPE` | `CallCompositeSupportedScreenOrientation.USER_LANDSCAPE`|
23+
|`FULL_SENSOR` | `CallCompositeSupportedScreenOrientation.FULL_SENSOR`|
24+
|`USER` | `CallCompositeSupportedScreenOrientation.USER`|
2525

2626
### Orientation API
2727

28-
`CallCompositeSupportedScreenOrientation` is a custom type for UI Library for Android. The name for the orientation type is defined by keeping similarity between Android Platform's orientation mode names. By default, the setup screen orientation is set with `PORTRAIT` mode and calling screen is set with `USER` mode. To set a different orientation for the screens other than default one, developers can pass `CallCompositeSupportedScreenOrientation`. Out of the box, the UI Library includes a set of `CallCompositeSupportedScreenOrientation` usable with the composite.
28+
`CallCompositeSupportedScreenOrientation` is a custom type for the Android UI Library. The name for the orientation type is defined by keeping similarity with the names of the Android platform's orientation modes.
2929

30-
You can also obtain list of `CallCompositeSupportedScreenOrientation` by the static function `CallCompositeSupportedScreenOrientation.values()`.
30+
By default, the setup screen orientation is in `PORTRAIT` mode and the calling screen is in `USER` mode. To set a different orientation for the screens, you can pass `CallCompositeSupportedScreenOrientation`. Out of the box, the UI Library includes a set of `CallCompositeSupportedScreenOrientation` types that are usable with the composite.
3131

32-
#### Usage
32+
You can also get a list of `CallCompositeSupportedScreenOrientation` types by using the static function `CallCompositeSupportedScreenOrientation.values()`.
3333

34-
To set orientation, specify a `CallCompositeSupportedScreenOrientation` and pass it to the `CallCompositeBuilder`. For the example below, we'll set `FULL_SENSOR` for setup screen and `LANDSCAPE` for calling screen of the composite.
34+
To set the orientation, specify `CallCompositeSupportedScreenOrientation` and pass it to `CallCompositeBuilder`. The following example sets `FULL_SENSOR` for the setup screen and `LANDSCAPE` for the calling screen of the composite.
3535

3636
#### [Kotlin](#tab/kotlin)
3737

3838
```kotlin
3939
import com.azure.android.communication.ui.calling.models.CallCompositeSupportedScreenOrientation
4040

41-
// CallCompositeSupportedLocale provides list of supported locale
41+
// CallCompositeSupportedLocale provides a list of supported locales
4242
val callComposite: CallComposite =
4343
CallCompositeBuilder()
4444
.setupScreenOrientation(CallCompositeSupportedScreenOrientation.FULL_SENSOR)
@@ -51,7 +51,7 @@ val callComposite: CallComposite =
5151
```java
5252
import com.azure.android.communication.ui.calling.models.CallCompositeSupportedScreenOrientation;
5353

54-
// CallCompositeSupportedLocale provides list of supported locale
54+
// CallCompositeSupportedLocale provides a list of supported locales
5555
CallComposite callComposite =
5656
new CallCompositeBuilder()
5757
.setupScreenOrientation(CallCompositeSupportedScreenOrientation.FULL_SENSOR)
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: In this tutorial, you learn how to use the Calling composite on iOS.
2+
description: Learn how to use the Calling composite on iOS.
33
author: mbellah
44

55
ms.author: mbellah
@@ -8,28 +8,30 @@ ms.topic: include
88
ms.service: azure-communication-services
99
---
1010

11-
Azure Communication UI [open source library](https://github.com/Azure/communication-ui-library-ios) for iOS and the sample application code can be found [here](https://github.com/Azure-Samples/communication-services-ios-quickstarts/tree/main/ui-calling)
11+
For more information, see the [open-source iOS UI Library](https://github.com/Azure/communication-ui-library-ios) and the [sample application code](https://github.com/Azure-Samples/communication-services-ios-quickstarts/tree/main/ui-calling).
1212

1313
### Available orientations
1414

15-
The following is a table of `OrientationOptions` with out of the box orientations. If you want to set orientation of the different screens of the composite, set the `OrientationOptions` into `CallComposite`.
15+
The following table lists `OrientationOptions` types for out-of-the-box orientations. If you want to set the orientation of the various screens of the composite, set `OrientationOptions` to `CallComposite`.
1616

17-
|Orientation Mode| OrientationOptions|
17+
|Orientation mode| OrientationOptions type|
1818
|---------|---------|
19-
|portrait | OrientationOptions.portrait|
20-
|landscape | OrientationOptions.landscape|
21-
|landscapeRight | OrientationOptions.landscapeRight|
22-
|landscapeLeft | OrientationOptions.landscapeLeft|
23-
|allButUpsideDown | OrientationOptions.allButUpsideDown|
19+
|`portrait` | `OrientationOptions.portrait`|
20+
|`landscape` | `OrientationOptions.landscape`|
21+
|`landscapeRight` | `OrientationOptions.landscapeRight`|
22+
|`landscapeLeft` | `OrientationOptions.landscapeLeft`|
23+
|`allButUpsideDown` | `OrientationOptions.allButUpsideDown`|
2424

2525
### Orientation API
2626

27-
`OrientationOptions` is a custom type for UI Library for iOS. The name for the orientation type is defined by keeping similarity between iOS Platform's orientation mode names. By default, the setup screen orientation is set with `portrait` mode and calling screen is set with `allButUpsideDown` mode. To set a different orientation for the screens other than default one, developers can pass `OrientationOptions`. Out of the box, the UI Library includes a set of `OrientationOptions` usable with the composite.
27+
`OrientationOptions` is a custom type for the iOS UI Library. The name for the orientation type is defined by keeping similarity with the names of the iOS platform's orientation modes.
28+
29+
By default, the setup screen orientation is in `portrait` mode and the calling screen is in `allButUpsideDown` mode. To set a different orientation for the screens, you can pass `OrientationOptions`. Out of the box, the UI Library includes a set of `OrientationOptions` types that are usable with the composite.
2830

2931
```swift
3032

3133
let callCompositeOptions = CallCompositeOptions(localization: localizationConfig,
3234
setupScreenOrientation: OrientationOptions.portrait,
3335
callingScreenOrientation: OrientationOptions.allButUpsideDown)
3436
let callComposite = CallComposite(withOptions: callCompositeOptions)
35-
```
37+
```
Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: In this tutorial, you learn how to use the Calling composite on Android
2+
description: Learn how to use the Calling composite on Android.
33
author: mbellah
44

55
ms.author: mbellah
@@ -8,21 +8,19 @@ ms.topic: include
88
ms.service: azure-communication-services
99
---
1010

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)
11+
For more information, see the [open-source Android UI Library](https://github.com/Azure/communication-ui-library-android) and the [sample application code](https://github.com/Azure-Samples/communication-services-android-quickstarts/tree/main/ui-calling).
1212

13+
### Option to skip the setup screen
1314

14-
### Skip setup screen option
15+
`CallCompositeLocalOptions` is an options wrapper that sets the capability of the UI Library to skip the setup screen by using a Boolean. By default, the capability to skip the setup screen is set to `false`. You have to set `skipSetupScreen` with a `true` Boolean value to provide the experience of skipping the setup screen.
1516

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+
We recommend that you build your application in such a way that when a user tries to join a call, microphone permission is already granted for a smooth joining experience.
1718

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+
:::image type="content" source="media/android-bypass-setup-screen.png" alt-text="Screenshot of joining call by skipping the setup screen for Android.":::
1920

20-
:::image type="content" source="media/android-bypass-setup-screen.png" alt-text="Diagram of joining call skipping the setup screen for Android.":::
21+
To use the feature, pass the Boolean value with `skipSetupScreen` to `CallCompositeLocalOptions` and inject it into `callComposite.launch`.
2122

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)
23+
#### [Kotlin](#tab/kotlin)
2624

2725
```kotlin
2826
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions
@@ -33,7 +31,7 @@ val localOptions: CallCompositeLocalOptions = CallCompositeLocalOptions()
3331
callComposite.launch(callLauncherActivity, remoteOptions, localOptions)
3432
```
3533

36-
### [Java](#tab/java)
34+
#### [Java](#tab/java)
3735
```java
3836
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions;
3937

@@ -42,18 +40,20 @@ final CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
4240

4341
callComposite.launch(callLauncherActivity, remoteOptions, localOptions);
4442
```
43+
4544
-----
4645

47-
### Default camera and microphone configuration options
46+
### Default options for camera and microphone configuration
4847

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.
48+
By default, the setup screen gives users an option to configure camera and microphone settings before joining a call. When you set up skipping the setup screen to join a call, users don't have that option until they're on the call.
5049

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.
50+
You can pass a Boolean value with `cameraOn` and `microphoneOn` to turn the camera and microphone on or off before users join a call. The functionality of controlling the default state of the camera and microphone isn't affected if a user grants the permission for each of them respectively.
5251

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`.
52+
By default, both `cameraOn` and `microphoneOn` are set to `false`. You can use this functionality even with the UI Library's default call-joining experience. In that case, the camera and microphone are turned on or off on the setup screen according to the configuration that you set.
5553

56-
### [Kotlin](#tab/kotlin)
54+
To set the default state of the camera and microphone, pass the Boolean value with `cameraOn` and `microphoneOn` to `CallCompositeLocalOptions` and inject it into `callComposite.launch`.
55+
56+
#### [Kotlin](#tab/kotlin)
5757

5858
```kotlin
5959
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions
@@ -65,7 +65,7 @@ val localOptions: CallCompositeLocalOptions = CallCompositeLocalOptions()
6565
callComposite.launch(callLauncherActivity, remoteOptions, localOptions)
6666
```
6767

68-
### [Java](#tab/java)
68+
#### [Java](#tab/java)
6969

7070
```java
7171
import com.azure.android.communication.ui.calling.models.CallCompositeLocalOptions;
@@ -76,44 +76,46 @@ final CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions()
7676

7777
callComposite.launch(callLauncherActivity, remoteOptions, localOptions);
7878
```
79+
7980
-----
8081

8182
### Permission handling
8283

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+
We recommend that you let users join a call with microphone and camera permission being granted to use the feature of skipping the setup screen with default configuration APIs for the microphone and camera. If you don't handle the permissions of the user, the UI Library tries to handle them for you.
8485

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.
86+
Users must enable microphone permission to join a call. If users try to join a call after denying microphone permission, the UI Library drops the call in the connecting stage and throws an error with the code `CallCompositeErrorCode.MICROPHONE_PERMISSION_NOT_GRANTED`.
8787

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.
88+
However, users can join a call even if they deny camera permission. The UI Library disables the camera functionality when camera permission is denied. So, the default configuration API for the camera doesn't affect the calling experience. Users can enjoy the effect of the default configuration API for the camera after granting the camera permission.
8989

90-
### Network error
90+
We recommend that you handle the microphone permission. If users join the call with the camera turned on by default, we recommend that you also handle the camera permission.
9191

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`.
92+
### Network errors
9393

94-
It's recommended to join the call by checking network availability to avoid such error.
94+
If a network disruption happens during a call or a call drops, the UI Library closes and throws an error with the code `CallCompositeErrorCode.CALL_END_FAILED`.
95+
96+
If a user doesn't have a network connection and tries to join the call after skipping the setup screen, the UI Library closes at the call-connecting stage and throws an error with the code `CallCompositeErrorCode.NETWORK_CONNECTION_NOT_AVAILABLE`. To avoid this error, we recommend that you configure your application to check network availability before users join a call.
9597

9698
To receive error events, call `setOnErrorHandler` with `CallComposite`.
9799

98100
The following `error` values might be sent to the error handler:
101+
99102
- `microphonePermissionNotGranted`
100103
- `networkConnectionNotAvailable`
101104

102-
### [Kotlin](#tab/kotlin)
105+
#### [Kotlin](#tab/kotlin)
103106

104107
```kotlin
105108
callComposite.addOnErrorEventHandler { callCompositeErrorEvent ->
106109
println(callCompositeErrorEvent.errorCode)
107110
}
108111
```
109112

110-
### [Java](#tab/java)
113+
#### [Java](#tab/java)
111114

112115
```java
113116
callComposite.addOnErrorEventHandler(callCompositeErrorEvent -> {
114117
System.out.println(callCompositeErrorEvent.getErrorCode());
115118
});
116119
```
117-
-----
118-
119120

121+
-----

0 commit comments

Comments
 (0)