Android Question WearOS watchface: is there a way to shorten the Ambient mode refresh interval?

s_kim

Member
Licensed User
Hi there,

I am new at B4A, so I apologize in advance if my question(s) seem very basic to most of you... I am trying to develop a watchface for Wear OS 2 and use Corwin42's watchface library.

My question is whether anyone knows a sensible way to shorten the Ambient mode refresh interval. I want to use my watch in always-on mode, but the approx-1min-refresh interval is a bit too long to my taste (ideally I would like a refresh rate of 10 or 15 sec).

I searched the forum and tried an approach someone else used for a wear app basically using StartServiceAtExact, but I couldn't get it to run: I started it within the WE_Draw event sub with "" and also tried to add a separate service module to the wear app, but could not get them to work.

Using PhoneWakeState to prevent the watch from turning on Ambient mode results in extreme battery consumption.

Manually switching off the Ambient mode at all will probably result in a similar high battery drain, such that it doesn't seem sensible either.

So, does anyone else have an idea how to call the event sub Draw more often than once every minute when using Corwin42's watchface library?

EDIT: I found the following description in the Google Java documentation
9. Optional: Increase the update frequency in ambient mode
https://codelabs.developers.google.com/codelabs/always-on/index.html#6
They use "AlarmManager" as timer: my understanding from other posts in the B4A forum is that StartServiceAtExact is essentially a wrapper for the same mechanism, but as I said this didn't work for me, perhaps because I use Corwin42's watchface library..?

Any help would be greatly appreciated.

Cheers,
Seong-Han
 
Last edited:
Top