Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.wear:wear:1.0.0-rc01

AmbientModeSupport.AmbientCallback

public static abstract class AmbientModeSupport.AmbientCallback
extends Object

java.lang.Object
   ↳ androidx.wear.ambient.AmbientModeSupport.AmbientCallback


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

Summary

Public constructors

AmbientModeSupport.AmbientCallback()

Public methods

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.

void onEnterAmbient(Bundle ambientDetails)

Called when an activity is entering ambient mode.

void onExitAmbient()

Called when an activity should exit ambient mode.

void onUpdateAmbient()

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

Inherited methods

Public constructors

AmbientModeSupport.AmbientCallback

added in version 1.0.0
public AmbientModeSupport.AmbientCallback ()

Public methods

onAmbientOffloadInvalidated

added in version 1.0.0
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.

onEnterAmbient

added in version 1.0.0
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: bundle containing information about the display being used. It includes information about low-bit color and burn-in protection.

onExitAmbient

added in version 1.0.0
public void onExitAmbient ()

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

onUpdateAmbient

added in version 1.0.0
public void onUpdateAmbient ()

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