android / wear-os-samples

Multiple samples showing best practices in app and watch face development on Wear OS.
https://developer.android.com/wear
Apache License 2.0
1.12k stars 572 forks source link

Request: Always on for Compose using AmbientLifeCycleObserver #872

Closed bradmartin closed 1 year ago

bradmartin commented 1 year ago

I've reviewed the AlwaysOnKotlin project and notice it does not use the AmbientLifeCycleObserver as suggested in the Android docs.

https://developer.android.com/reference/androidx/wear/ambient/AmbientMode - Deprecation notice here.

I've tried implementing it in my own Compose WearOS app but the watch screen just turns blank instead of moving to ambient mode. It's possible I'm overlooking somethat that has not been updated in the documentation.

Would be great to get a Compose Always On simple example.

yschimke commented 1 year ago

See here https://github.com/android/wear-os-samples/pull/880