Update to use rememberAmbientModeManager#345
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the ambient mode handling in the Exercise Sample Compose application. It migrates from the Horologist AmbientState API to the androidx.wear.compose.foundation rememberAmbientModeManager for managing ambient mode. The ambientGray and ambientBlank modifiers were updated to accept a boolean isAmbient parameter. While PreparingExerciseScreen was successfully updated to use the new ambient mode manager, the ExerciseScreen had its ambient mode adaptation removed entirely, which is an oversight as it's part of the always-on routes. This needs to be addressed by re-implementing ambient mode detection and applying the ambientGray modifier to the ExerciseScreen. Additionally, several dependencies were updated to their latest versions.
| timeText = { ResponsiveTimeText(timeSource = FixedTimeSource) } | ||
| ) { | ||
| ExerciseScreen( | ||
| isAmbient = false, |
There was a problem hiding this comment.
This needs to be true otherwise the state is the same as above (and the screenshot is exactly the same).
There was a problem hiding this comment.
thank you! that' updated now
Update to use rememberAmbientModeManager from Compose 1.6.
Tested by using https://developer.android.com/training/wearables/always-on#debugging.