How to get the position on Vivoactive HR?

Former Member
Former Member
I wanted to make a Watch-App on the Vivoactive HR where I need to get the GPS coordinates from the Watch. I already tried with the PositionSample and made it executable for my own device but it couldn't get any GPS signals. Did I miss on something?

Thanks for any replies!
  • Here's a bit of code that shows how I do it, Starting with doing a one-shot of GPS in initialize()
    function initialize() {
    View.initialize();
    Position.enableLocationEvents(Position.LOCATION_ONE_SHOT, method(:onPosition));
    }

    And here's onPosition():
    function onPosition(info) {
    var latLon = info.position.toDegrees();
    lat=latLon[0].toString();
    lon=latLon[1].toString();
    }

    (lat and lon are class variables)

    If it doesn't work in CIQ. make sure you get lock GPS with something like the native run app. If not, try power cycling the watch.

    For testing in the Sim, you can use Simulation>FIT data to make sure it works.