Skip to content

Commit 541a203

Browse files
Update ACS mobile PiP how-to
1 parent 7794bb6 commit 541a203

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For more information, see the [open-source Android UI Library](https://github.co
1212

1313
### Picture-in-picture setup
1414

15-
To enable multitasking and picture-in-picture, use `CallCompositeBuilder.multitasking` to set `CallCompositeMultitaskingOptions` with `enableMultitasking` and `enableSystemPiPWhenMultitasking` constructor parameters.
15+
To enable multitasking and picture-in-picture, use `CallCompositeBuilder.multitasking` to set `CallCompositeMultitaskingOptions` with `enableMultitasking` and `enableSystemPictureInPictureWhenMultitasking` constructor parameters.
1616

1717
#### [Kotlin](#tab/kotlin)
1818

@@ -38,33 +38,36 @@ The **Back** button appears when `enableMultitasking` is set to `true`.
3838

3939
:::image type="content" source="media/android-call-screen.png" alt-text="Screenshot of the Android call screen with the Back button visible.":::
4040

41-
When you turn on multitasking for `CallComposite`, the call activity starts in a dedicated task. In the task history, the user sees two screens: one for the app's activity and one for Communication Services call activity.
41+
When user taps back button Calling UI is hidden and, if configured, Picture-in-Picture view is displayed.
4242

43-
#### [Kotlin](#tab/kotlin)
43+
When multitasking is ON for `CallComposite`, the call activity starts in a dedicated task. In the task history, the user sees two screens: one for the app's activity and one for Communication Services call activity.
44+
45+
-----
4446

47+
To enter multitasking programmatically and if configured display Picture-in-Picture, call the `sendToBackground` method.
48+
49+
#### [Kotlin](#tab/kotlin)
4550
```kotlin
46-
callComposite.displayCallCompositeIfWasHidden(context)
51+
callComposite.sendToBackground()
4752
```
4853

4954
#### [Java](#tab/java)
5055

5156
```java
52-
callComposite.displayCallCompositeIfWasHidden(context);
57+
callComposite.sendToBackground();
5358
```
54-
5559
-----
5660

57-
To enter multitasking programmatically, call the `hide` method.
61+
To bring user back to the calling activity programmatically use `bringToForeground` function:
5862

5963
#### [Kotlin](#tab/kotlin)
64+
6065
```kotlin
61-
callComposite.hide()
66+
callComposite.bringToForeground(context)
6267
```
6368

6469
#### [Java](#tab/java)
6570

6671
```java
67-
callComposite.hide();
72+
callComposite.bringToForeground(context);
6873
```
69-
70-
-----

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To enable multitasking and picture-in-picture, use the `CallCompositeOptions` co
2020
```swift
2121
let callCompositeOptions = CallCompositeOptions(
2222
enableMultitasking: true,
23-
enableSystemPiPWhenMultitasking: true)
23+
enableSystemPictureInPictureWhenMultitasking: true)
2424

2525
let callComposite = CallComposite(withOptions: callCompositeOptions)
2626
```
@@ -29,14 +29,21 @@ The **Back** button appears when `enableMultitasking` is set to `true`.
2929

3030
:::image type="content" source="media/ios-call-screen.png" alt-text="Screenshot of the iOS call screen with the Back button visible.":::
3131

32-
To open the call UI, the user opens a call activity programmatically or by selecting the notification on the top bar. To reopen the UI programmatically, the app needs to preserve a reference to `CallComposite` and execute the `displayCallCompositeIfWasHidden` method.
32+
33+
When user taps back button Calling UI is hidden and, if configured, Picture-in-Picture view is displayed.
34+
35+
-----
36+
37+
To enter or exit multitasking programmatically, use `isHidden` property:
38+
3339

3440
```swift
35-
callComposite.displayCallCompositeIfWasHidden(context)
41+
// Close calling UI and display PiP
42+
callComposite.isHidden = true
3643
```
3744

38-
To enter multitasking programmatically, call the `hide` method.
39-
4045
```swift
41-
callComposite.hide()
46+
// Displaye calling UI and close PiP
47+
callComposite.isHidden = false
4248
```
49+

articles/communication-services/how-tos/ui-library-sdk/picture-in-picture.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ While a user is on a call, a full-screen UI can prevent the user from multitaski
2222

2323
This article shows you how to turn on picture-in-picture in the Azure Communication Services UI Library. The picture-in-picture feature is system provided and is subject to feature support on the device, including CPU load, RAM availability, and battery state.
2424

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

2726
## Prerequisites
2827

0 commit comments

Comments
 (0)