Skip to content

Commit 960cccd

Browse files
Merge pull request #266966 from pavelprystinka/pavelprystinka/acs_ui_mobile_pip_ga
Update ACS mobile PiP how-to
2 parents 62ab73b + d540dc5 commit 960cccd

File tree

4 files changed

+30
-19
lines changed

4 files changed

+30
-19
lines changed

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

Lines changed: 15 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,37 @@ 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+
46+
-----
47+
48+
To enter multitasking programmatically and if configured display Picture-in-Picture, call the `sendToBackground` method.
4449

50+
#### [Kotlin](#tab/kotlin)
4551
```kotlin
46-
callComposite.displayCallCompositeIfWasHidden(context)
52+
callComposite.sendToBackground()
4753
```
4854

4955
#### [Java](#tab/java)
5056

5157
```java
52-
callComposite.displayCallCompositeIfWasHidden(context);
58+
callComposite.sendToBackground();
5359
```
54-
5560
-----
5661

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

5964
#### [Kotlin](#tab/kotlin)
65+
6066
```kotlin
61-
callComposite.hide()
67+
callComposite.bringToForeground(context)
6268
```
6369

6470
#### [Java](#tab/java)
6571

6672
```java
67-
callComposite.hide();
73+
callComposite.bringToForeground(context);
6874
```
69-
70-
-----

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

Lines changed: 14 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,22 @@ 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+
38+
To enter or exit multitasking programmatically, use `isHidden` property:
39+
3340

3441
```swift
35-
callComposite.displayCallCompositeIfWasHidden(context)
42+
// Close calling UI and display PiP
43+
callComposite.isHidden = true
3644
```
3745

38-
To enter multitasking programmatically, call the `hide` method.
39-
4046
```swift
41-
callComposite.hide()
47+
// Displaye calling UI and close PiP
48+
callComposite.isHidden = false
4249
```
50+

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

articles/communication-services/quickstarts/ui-library/includes/get-started-call/ios.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ In Xcode, create a new project:
4848

4949
target 'UILibraryQuickStart' do
5050
use_frameworks!
51-
pod 'AzureCommunicationUICalling', '1.2.0'
51+
pod 'AzureCommunicationUICalling', '1.6.0'
5252
end
5353
```
5454

0 commit comments

Comments
 (0)