How to deactivate GPS for indoor activities

Hi everybody,

I am writing an app for indoor running in order to get speed on a treadmill but I did not find how to deactivate GPS. I know that speed comes from 1) GPS 2) Sensor 3) accelerometer.
When running indoor, even if GPS is available, I don't want to use it...

In the built in application for indoor running, you can access to GPS option through : Parameters -> Applications -> Indoor Running -> Parameters for indoor running

But these options are not availble for my app...

Thank you for your help
  • If you create a custom activity, you can enable GPS using the Toybox.Position module, see https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Position.html
    My understanding is that GPS is disabled by default in your custom activity, so you don't have to do anything.
  • With CIQ watch apps, GPS is off unless you call Position.enableLocationEvents(). Same with the sensors. You need to enable what you want to use with Sensor.setEnabledSensors().
  • Thank for your answer Harry,

    It think it may be ok when using a sensor but I'm not sure if you want to use the built in accelerometer..
    In Activity:Info currentSpeed seem to be the same as positionnal Speed.
    In position:info, you have a speed attribute.
    And then you only have this explanation :

    "Speed is derived from the most accurate source in the following order:
    • GPS
    • Footpod
    • Accelerometer"
    There should be a way to activate the same options in the app menu as for indoor running, shouldn't it ?
  • You don't want GPS indoors, as even if you run on a track, the signal might be pretty bad. On a treadmill, you're not really going anywhere, so GPS does nothing. (don't call Position.enableLocationEvents() )

    What I do in my apps is enable the footpod (and Tempe and HRM), and if there is one paired and connected, it's used. If not, the watch itself is used. The same happens with native apps. if it sees a footpod, it uses it. (Call Sensor.setEnabledSensors([Sensor.SENSOR_FOOTPOD,Sensor.SENSOR_HEARTRATE,Sensor.SENSOR_TEMPERATURE]) )

    Are you thinking you only want to use a footpod and never fall back to the watch itself?

    maybe I'm not sure what you are trying to do