public abstract class

AmbientModeSupport.AmbientCallback

extends java.lang.Object

 java.lang.Object

↳androidx.wear.ambient.AmbientModeSupport.AmbientCallback

Overview

Callback to receive ambient mode state changes. It must be used by all users of AmbientModeSupport.

Summary

Constructors
publicAmbientCallback()

Methods
public voidonAmbientOffloadInvalidated()

Called to inform an activity that whatever decomposition it has sent to Sidekick is no longer valid and should be re-sent before enabling ambient offload.

public voidonEnterAmbient(Bundle ambientDetails)

Called when an activity is entering ambient mode.

public voidonExitAmbient()

Called when an activity should exit ambient mode.

public voidonUpdateAmbient()

Called when the system is updating the display for ambient mode.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public AmbientCallback()

Methods

public void onEnterAmbient(Bundle ambientDetails)

Called when an activity is entering ambient mode. This event is sent while an activity is running (after onResume, before onPause). All drawing should complete by the conclusion of this method. Note that invalidate() calls will be executed before resuming lower-power mode.

Parameters:

ambientDetails: bundle containing information about the display being used. It includes information about low-bit color and burn-in protection.

public void onUpdateAmbient()

Called when the system is updating the display for ambient mode. Activities may use this opportunity to update or invalidate views.

public void onExitAmbient()

Called when an activity should exit ambient mode. This event is sent while an activity is running (after onResume, before onPause).

public void onAmbientOffloadInvalidated()

Called to inform an activity that whatever decomposition it has sent to Sidekick is no longer valid and should be re-sent before enabling ambient offload.