Test widget access to old location/GPS position in simulator?

I have a Fenix 6 Pro that uses a couple of widgets that use the last known location (Garmin's Hunt & Fish, r.485 Calendar Watch Widget). These suddenly stopped working ("waiting for GPS") unless the watch is outdoors (or has had GPS reception during the last few minutes). Just as things work on a Fenix 3 or Epix. But on a Fenix 5 Plus, Hunt&Fish works fine even if the watch has been indoors for weeks.

As I haven't developed anything with CIQ for many years, before I invest a lot of time: is it possible to give the simulator a (GPS) location and 'age' that, i.e. make it an hour old for example, and then test a widget that uses Toybox.Position, for different watch types to see what the expected behavior should be?

  • Sounds like what you want to do is cache your last known location in your widget.  To initially get it, in the sim Start Simulation, Fit Data and either play back a fit or simulate data.  Then, in your widget, you can use Activity.Info.currentLocation or start up GPS.  If you get a location, save it using Application.Storage.

    Then in your app used the cached location (if it has one)  You can also cache a time stamp if you want to check the age of what's in the cache.

    This is the basics for different apps that need a location, such as watch faces/widgets that get weather data from a 3rd party site.  With a watch face you can't start GPS, so you can only use Activity.Info.currentLocation.

    If you do start up GPS, you want to check the accuracy as on some devices, you'll see "last known" while it's trying to get a GPS lock.

  • Thank you, that is exactly what I was looking for! I have a bunch of other work first,  so it will take some time before I get this done,  but I'll report back here with results from Fenix 5 and 6.

    ..and then make my own hunt & fish widget that *does* work indoors on the Fenix 6, if I ever get that far..

    (I don't use that widget for hunting but for bird/wildlife spotting)