AmbientLifecycleObserver.AmbientDetails

Added in 1.3.0

class AmbientLifecycleObserver.AmbientDetails


Details about ambient mode support on the current device, passed to AmbientLifecycleCallback.onEnterAmbient.

Summary

Public constructors

AmbientDetails(
    burnInProtectionRequired: Boolean,
    deviceHasLowBitAmbient: Boolean
)

Public functions

open String

Public properties

Boolean

whether the ambient layout must implement burn-in protection.

Boolean

whether this device has low-bit ambient mode.

Public constructors

AmbientDetails

Added in 1.3.0
AmbientDetails(
    burnInProtectionRequired: Boolean,
    deviceHasLowBitAmbient: Boolean
)
Parameters
burnInProtectionRequired: Boolean

whether the ambient layout must implement burn-in protection. When this property is set to true, views must be shifted around periodically in ambient mode. To ensure that content isn't shifted off the screen, avoid placing content within 10 pixels of the edge of the screen. Activities should also avoid solid white areas to prevent pixel burn-in. Both of these requirements only apply in ambient mode, and only when this property is set to true.

deviceHasLowBitAmbient: Boolean

whether this device has low-bit ambient mode. When this property is set to true, the screen supports fewer bits for each color in ambient mode. In this case, activities should disable anti-aliasing in ambient mode.

Public functions

toString

open fun toString(): String

Public properties

burnInProtectionRequired

Added in 1.3.0
val burnInProtectionRequiredBoolean

whether the ambient layout must implement burn-in protection. When this property is set to true, views must be shifted around periodically in ambient mode. To ensure that content isn't shifted off the screen, avoid placing content within 10 pixels of the edge of the screen. Activities should also avoid solid white areas to prevent pixel burn-in. Both of these requirements only apply in ambient mode, and only when this property is set to true.

deviceHasLowBitAmbient

Added in 1.3.0
val deviceHasLowBitAmbientBoolean

whether this device has low-bit ambient mode. When this property is set to true, the screen supports fewer bits for each color in ambient mode. In this case, activities should disable anti-aliasing in ambient mode.