PictureInPictureProvider


public interface PictureInPictureProvider extends 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.


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

Summary

Public methods

abstract void

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

abstract void

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

Inherited methods

From androidx.core.app.OnPictureInPictureModeChangedProvider
abstract void

Add a new listener that will get a callback associated with Activity.onPictureInPictureModeChanged with the new PictureInPictureModeChangedInfo.

abstract void

Remove a previously added listener.

From androidx.core.app.OnPictureInPictureUiStateChangedProvider
abstract void

Add a new listener that will get a callback associated with Activity.onPictureInPictureUiStateChanged with the new PictureInPictureUiStateCompat.

abstract void

Remove a previously added listener.

From androidx.core.app.OnUserLeaveHintProvider
abstract void

Add a new listener that will get a callback associated with Activity.onUserLeaveHint

abstract void

Remove a previously added listener.

Public methods

enterPictureInPictureMode

abstract void enterPictureInPictureMode(@NonNull PictureInPictureParamsCompat params)

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

abstract void setPictureInPictureParams(@NonNull PictureInPictureParamsCompat params)

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
@NonNull PictureInPictureParamsCompat params

PictureInPictureParams to use for picture-in-picture mode.