You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that using AndroidAPS complications on my Wear OS watch significantly increases battery consumption - reducing battery life by several hours. Upon analyzing battery logs, I found that AndroidAPS acquires a WakeLock every 15 seconds, which prevents the device from entering a more power-efficient sleep mode.
The issue originates from this line in BaseComplicationProviderService. The intention behind this logic is to ensure complications update correctly when displaying the time elapsed since the last CGM reading. However, this approach keeps the CPU awake unnecessarily, leading to excessive power drain.
A more battery-efficient way to achieve the same behavior is to use ComplicationText.TimeDifferenceBuilder. This allows the system to intelligently update the complication only when needed, reducing unnecessary wake-ups and code executions and allowing the watch to stay in a low-power state when not in use.
I’ve implemented this approach for the LongStatusComplication, and it has worked well in my testing. My changes can be found in the wear-complications-timedifference branch.
Additionally, newer Wear OS versions and Jetpack libraries introduce dynamic expressions, which provide even more flexibility for complication updates while optimizing battery usage.
The text was updated successfully, but these errors were encountered:
I have noticed that using AndroidAPS complications on my Wear OS watch significantly increases battery consumption - reducing battery life by several hours. Upon analyzing battery logs, I found that AndroidAPS acquires a WakeLock every 15 seconds, which prevents the device from entering a more power-efficient sleep mode.
The issue originates from this line in
BaseComplicationProviderService
. The intention behind this logic is to ensure complications update correctly when displaying the time elapsed since the last CGM reading. However, this approach keeps the CPU awake unnecessarily, leading to excessive power drain.A more battery-efficient way to achieve the same behavior is to use
ComplicationText.TimeDifferenceBuilder
. This allows the system to intelligently update the complication only when needed, reducing unnecessary wake-ups and code executions and allowing the watch to stay in a low-power state when not in use.I’ve implemented this approach for the
LongStatusComplication
, and it has worked well in my testing. My changes can be found in the wear-complications-timedifference branch.Additionally, newer Wear OS versions and Jetpack libraries introduce dynamic expressions, which provide even more flexibility for complication updates while optimizing battery usage.
The text was updated successfully, but these errors were encountered: