Do I need to use Position.enableLocationEvents in a simple app?

It's not clear from the documentation, but it looks like this function does 2 different things:

1. sets the device to use (or disable) the GNSS chip with the given options (i.e: GPS Only vs Multi system, etc)

2. the above + sets the callback for position events

I know there is a general confusion about how to disable GNSS, and some examples pass the method(:onPosition) even there, though it was confirmed by Garmin that it's not used when options is LOCATION_DISABLE, so it makes more sense to pass null for the callback.

However I realized that I don't have to set the callback in most cases. At least that's how it looks from testing in the simulator. For example if there's an app that only wants to record an activity session. Until now I had:
class HikerApp extends App.AppBase {
    function onStart(state as Dictionary?) as Void {
        Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, method(:onPosition));
    }

    function onPosition(info as Position.Info) as Void {
    }

    function onStop(state) {
        Position.enableLocationEvents(Position.LOCATION_DISABLE, null);
    }
}
But when I try in the simulator, then even using:

Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, null);
seems to work just fine.
Actually even if I don't call enableLocationEvents at all in my app it seems to work just fine (only because I have <iq:uses-permission id="Positioning"/> in my manifest).
If I'm right, then sending null (in case the app wants to set the options) or not calling it at all in case it just wants to record a session would save some battery (no need to call an empty function every second).
Am I correct? Or does this only work in the simulator? Or only on certain real devices?
  • Think of enableLocationEvents as how you turn on/off GPS. If you want GPS data in the fit, you need to turn it on.

    As far as the callback, if I recall that's optional, as when you're recording you can also get the data from Activity.Info.  I tend to use the callback so I can watch the accuracy after starting GPS and use that to decide when the recording can be started.

    When in doubt, just try it on a real device.