How to run background service for watch only if needed?

Hello, can someone please help me with this problem?

There is a bug in garmin reverse geocoding of getting weather location name. It worked some years ago and it works in some place, but not all. Strangely, in the Czech Republic it returns names of small villages, but instead of Prague, the capital, it returns "null" or "Location: 50:14").

I would like to check if my watch is getting this buggy response and if it does, I would like to call reverse geocoding server to obtain true location name. Here are challenges I am facing:

- start background service only if some condition is fullfilled (buggy location name from Garmin weather) - trigger it from watch face

- do not start background service if some condition is true (watch did not move too much since last geocoding call) - I understand background service is scheduled, so I somehow need to kill the service if it is running and kill the scheduling

Any advice how to achieve that please? I understand I can call background service in regular intervals, but I do not know how to trigger it from watch face. (the face is this).

Thanks, Jan

  • If you delete the temporal event, and then register when needed, the background will run right away and not if you don't need it but it has to be more than 5 minutes since it was deleted.

    Under the location you see in Garmin Weather is your phone's location, not the source of the weather data (the actual observation) so all you are displaying is where you are.

  • I wrote a test app a few years back where I start up GPS to get my current location and then display that vs what I get back from Garmin with weather.

    The difference is consistently maybe 100 feet.