The second Android 11 Developer Preview is now available, test it out and share your feedback.

SidecarCallback

interface SidecarCallback
androidx.window.sidecar.SidecarInterface.SidecarCallback

Callback that will be registered with the WindowManager library, and that the sidecar should use to report all state changes.

Summary

Public methods

abstract Unit
onDeviceStateChanged(@NonNull newDeviceState: SidecarDeviceState)

Called by sidecar when the device state changes.

abstract Unit
onWindowLayoutChanged(@NonNull windowToken: IBinder, @NonNull newLayout: SidecarWindowLayoutInfo)

Called by sidecar when the feature layout inside the window changes.

Public methods

onDeviceStateChanged

abstract fun onDeviceStateChanged(@NonNull newDeviceState: SidecarDeviceState): Unit

Called by sidecar when the device state changes.

onWindowLayoutChanged

abstract fun onWindowLayoutChanged(
    @NonNull windowToken: IBinder,
    @NonNull newLayout: SidecarWindowLayoutInfo
): Unit

Called by sidecar when the feature layout inside the window changes.