PictureInPictureProvider


interface PictureInPictureProvider : OnPictureInPictureModeChangedProvider, OnPictureInPictureUiStateChangedProvider, OnUserLeaveHintProvider

Known direct subclasses
ComponentActivity

Base class for activities that enables composition of higher level components.

Known indirect subclasses
AppCompatActivity

Base class for activities that wish to use some of the newer platform features on older Android devices.

BaseCarAppActivity

Core logic for CarAppLibrary Activity interaction with a host.

CarAppActivity

The class representing a car app activity in the main display.

FragmentActivity

Base class for activities that want to use the support-based Fragments.

LauncherActivity

This class handles providing the right launcher activity when running native applications and Car App Library applications.

PreviewActivity

Activity used to run @Composable previews from Android Studio.


Provider interface to support PiP (Picture-in-Picture) functionalities.

Summary

Public functions

Unit

Available since API 24 in the framework Activity class, puts the activity in picture-in-picture mode if possible in the current system state.

Unit

Available since API 26 in the framework Activity class, updates the properties of the picture-in-picture activity, or sets it to be used later when enterPictureInPictureMode is called

Public functions

enterPictureInPictureMode

fun enterPictureInPictureMode(params: PictureInPictureParamsCompat): Unit

Available since API 24 in the framework Activity class, puts the activity in picture-in-picture mode if possible in the current system state. Any prior calls to setPictureInPictureParams will still apply when entering picture-in-picture through this call.

setPictureInPictureParams

fun setPictureInPictureParams(params: PictureInPictureParamsCompat): Unit

Available since API 26 in the framework Activity class, updates the properties of the picture-in-picture activity, or sets it to be used later when enterPictureInPictureMode is called

Parameters
params: PictureInPictureParamsCompat

PictureInPictureParams to use for picture-in-picture mode.