Under Review
over 1 year ago

Waypoint intents fail to launch correct navigation to coordinates

Hi together,

In my Connect IQ app, I save a waypoint with PersistedContent.saveWaypoint(), then call System.exitTo() with an intent generated from that waypoint using waypoint.toIntent(). This previously worked to launch the navigation app and route to the waypoint location.

However, in the last 13.XX Connect IQ SDK update (Fenix 7/Fenix 7 Pro - Epix 2/Epix 2 Pro - Enduro 2 - Quatix 7 - Marq 2), the navigation intent launches the wrong coordinates.

Steps to reproduce:

1. Save waypoint with a known latitude/longitude

// Save waypoint
var location = new Position.Location({
:latitude => 40.123,
:longitude => -105.321,
:format => :degrees
});

PersistedContent.saveWaypoint(location, {
:name => "MyWaypoint"
});

2. Retrieve the last saved waypoint (this is simplified as in the real app I am iterating over all waypoints and finding the one with the correct name, this works for sure as I can see from the logs)

var waypointIterator = PersistedContent.getWaypoints();

var myWaypoint = waypointIterator.next();

3. Open the waypoint with exitTo

// Create intent from waypoint

var intent = myWaypoint.toIntent();

// Call exitTo with intent

System.println("arguments: " + intent.arguments); // in the simulator this outputs: "arguments: {symbol (8389063)=>1}"
System.println("uri: " + intent.uri); // in the simulator this outputs: "uri: navigate://waypoint"

System.exitTo(intent);

If I instead launch the navigation app directly using the saved waypoint itself, it routes properly. So the issue seems to be only with the intent generated from the waypoint.

 

Has the Api of "waypoint.toIntent()" or "System.exitTo()" recently been changed in 13.XX ?

This is quite frustrating as the code previously worked perfectly, but the recent updates seem to have broke my Apps functionality completely.

Thanks for any support/help here.