OnPictureInPictureModeChangedProvider

Added in 1.8.0

public interface OnPictureInPictureModeChangedProvider

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.

SdkActivity

Activity to start for SDKs running locally.


Interface for components that can dispatch calls from Activity.onPictureInPictureModeChanged.

Summary

Public methods

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.

Public methods

addOnPictureInPictureModeChangedListener

Added in 1.8.0
abstract void addOnPictureInPictureModeChangedListener(
    @NonNull Consumer<@NonNull PictureInPictureModeChangedInfo> listener
)

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

Parameters
@NonNull Consumer<@NonNull PictureInPictureModeChangedInfo> listener

The listener that should be called whenever Activity.onPictureInPictureModeChanged was called.

removeOnPictureInPictureModeChangedListener

Added in 1.8.0
abstract void removeOnPictureInPictureModeChangedListener(
    @NonNull Consumer<@NonNull PictureInPictureModeChangedInfo> listener
)

Remove a previously added listener. It will not receive any future callbacks.

Parameters
@NonNull Consumer<@NonNull PictureInPictureModeChangedInfo> listener

The listener previously added with addOnPictureInPictureModeChangedListener that should be removed.