Skip to main content
Enable Picture-in-Picture (PiP) mode to allow users to continue their call in a floating window while using other apps. PiP provides a seamless multitasking experience during calls.
Picture-in-Picture implementation is handled at the app level using Android’s PiP APIs. The Calls SDK only adjusts the call UI layout to fit the PiP window - it does not manage the PiP window itself.

How It Works

  1. Your app enters PiP mode using Android’s enterPictureInPictureMode() API
  2. You notify the Calls SDK by calling enablePictureInPictureLayout()
  3. The SDK adjusts the call UI to fit the smaller PiP window (hides controls, optimizes layout)
  4. When exiting PiP, call disablePictureInPictureLayout() to restore the full UI

Enable Picture-in-Picture

Enter PiP mode programmatically using the enablePictureInPictureLayout() action:

Disable Picture-in-Picture

Exit PiP mode and return to the full-screen call interface:

Listen for PiP Events

Monitor PiP mode transitions using LayoutListener to update your UI accordingly:

Auto-Enter PiP on Home Press

To automatically enter PiP mode when the user presses the home button or navigates away, override onUserLeaveHint() in your Activity:

Android Manifest Configuration

Add PiP support to your Activity in AndroidManifest.xml:
PiP mode is only available on Android 8.0 (API level 26) and higher. On older devices, the PiP actions will have no effect.