So this isn't something we can just hook on to. I guess the best solution is actually for the Bangle interface code to just check prefs.getBoolean("use_updated_location_if_available", false) and then turn the GPS on and request location direct from Android if GPS has been requested.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just looking into this, the pref is called
use_updated_location_if_available
and there's aCurrentPosition
class which tries to get the current location updated every 24 hours (but it seems it won't actually turn the GPS on if it's not needed): https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/master/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/webview/CurrentPosition.javaSo this isn't something we can just hook on to. I guess the best solution is actually for the Bangle interface code to just check
prefs.getBoolean("use_updated_location_if_available", false)
and then turn the GPS on and request location direct from Android if GPS has been requested.