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/ui-library-sdk/includes/orientation/android.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
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.
3
3
author: mbellah
4
4
5
5
ms.author: mbellah
@@ -8,37 +8,37 @@ ms.topic: include
8
8
ms.service: azure-communication-services
9
9
---
10
10
11
-
Azure Communication UI [opensource 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).
12
12
13
13
### Available orientations
14
14
15
-
The following is a table of`CallCompositeSupportedScreenOrientation`with out of thebox 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`.
`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.
29
29
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.
31
31
32
-
#### Usage
32
+
You can also get a list of `CallCompositeSupportedScreenOrientation` types by using the static function `CallCompositeSupportedScreenOrientation.values()`.
33
33
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.
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.
3
3
author: mbellah
4
4
5
5
ms.author: mbellah
@@ -8,28 +8,30 @@ ms.topic: include
8
8
ms.service: azure-communication-services
9
9
---
10
10
11
-
Azure Communication UI [opensource 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).
12
12
13
13
### Available orientations
14
14
15
-
The following is a table of`OrientationOptions`with out of thebox 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`.
`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.
28
30
29
31
```swift
30
32
31
33
let callCompositeOptions =CallCompositeOptions(localization: localizationConfig,
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.
3
3
author: mbellah
4
4
5
5
ms.author: mbellah
@@ -8,21 +8,19 @@ ms.topic: include
8
8
ms.service: azure-communication-services
9
9
---
10
10
11
-
Azure Communication UI [opensource 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).
12
12
13
+
### Option to skip the setup screen
13
14
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.
15
16
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.
17
18
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.":::
19
20
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`.
21
22
22
-
23
-
To use the feature, pass the boolean value with `skipSetupScreen` to `CallCompositeLocalOptions` and inject it to `callComposite.launch`.
### Default camera and microphone configuration options
46
+
### Default options for camera and microphone configuration
48
47
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.
50
49
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.
52
51
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.
55
53
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`.
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.
84
85
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`.
87
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.
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.
89
89
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.
91
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`.
92
+
### Network errors
93
93
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.
95
97
96
98
To receive error events, call `setOnErrorHandler` with `CallComposite`.
97
99
98
100
The following `error` values might be sent to the error handler:
0 commit comments