?System.exitTo() fails on VA-HR

A Descriptive Title : System.exitTo() fails on VA-HR
o The Environment:
SW 4.00
-Operating System or Device (including OS number or Software version of device)
-Eclipse Version
Mars 2
o A detailed description of the issue
The System.exitTo targetApp works on the sim but it totally fails on the VA-HR!

I have put it in a try/catch, but nothing is caught.
I definitely have the identified app on the watch.

I tried both flavors of the manifest_id, with and without the hyphens:
"manifest-id://D7263291252F45DAA6132E0F272F4CFF" ,
"manifest-id://D7263291-252F-45DA-A6132E0F272F4CFF" ,
with the same result - the System.exitTo(targetApp) was just ignored.
Interestingly, both flavors worked on the Sim???

If, on the watch (and the sim) I pass an incorrect manifest_id, I get the expected AppNotInstalledException.
So it knows my target app is installed, but doesn't know how to start it!
o Steps to reproduce the issue
Modify the code to reference a manifest_id of a project you have in Eclipse., and on your watch.
Build and run on the simulator. It generates a confirmation dialog and proceeds to run the target app.
Install the app on a VA-HR and the confirmation dialog does not display.
o Any applicable additional information
Something odd happens on the watch. It looks like it's loading a second instance of the apps menu, because when I swipe back to the watchface, a second copy of the app menu is displayed.

o A code sample that can reproduce the issue (in email only if preferred)
function onStart(state) {
var targetApp = new System.Intent(
"manifest-id://D7263291252F45DAA6132E0F272F4CFF" ,
{"arg"=>"CurrentAppName"}
);
try {
System.println("main. onStart exiting to targetApp");
System.exitTo(targetApp);
}
catch( ex instanceof System.UnexpectedAppTypeException ) {
System.println("caught UnexpectedAppTypeException");
}
catch( ex instanceof System.PreviousOperationNotCompleteException ) {
System.println("caught PreviousOperationNotCompleteException");
}
catch( ex instanceof System.AppNotInstalledException ) {
System.println("caught AppNotInstalledException");
} catch (e){
System.println("main. catch:"+ e.toString());
}

}
  • Former Member
    Former Member
    r.485,

    I've downloaded the two apps in questions and haven't run into any issues. I think I've dug into most of the funtionality. Can you give me some exact steps to take to reproduce your crash. I'm able save, recall, and navigate to saved locations in both apps. When you view the map in the Routes app is it pushing the Maps app? I'm expecting to see some sort of confirmation dialog and a crash, but I don't think I'm seeing where one app is pushing an intent to the other.

    Thanks,
    -Coleman
  • r.485,

    It looks like the vivoactive HR team is saying this is fixed in the latest beta here: http://www8.garmin.com/support/download_details.jsp?id=12595
    Let me know if it's still giving you trouble and I'll get them in the know so we can try to get it corrected before production if needed.

    Thanks!
    -Coleman

    I am afraid that the lack of precision in this response further supports my decision to abandon further development on this platform.
    I submitted a simple test case for this issue and would expect as a minimum confirmation that the the issue is fixed with the firmware update.
    w
  • @Coleman.ConnectIQ,

    Thanks for checking the issue.

    The problem with my app (which I've renamed to "Waypoints and Routes") isn't a crash, but an unexpected PreviousOperationNotCompleteException, which is handled within the app to avoid a crash. I explained it into more details here:
    https://forums.garmin.com/forum/developers/connect-iq/connect-iq-bug-reports/1272132-vivoactive-hr-sys-exitto-intent-previousoperationnotcompleteexception

    In the aforementioned thread, I wrote a simple code that could be used to reproduce the problem. But that would require another app (the one which should be opened by the intent) to be uploaded to the store. So, if you prefer to test with my apps, here's what you must do:

    Video demonstration (works fine in simulator):
    https://youtu.be/BZ-S31SeXTE
    https://youtu.be/n8Bn_UTPFI8

    Detailed steps:
    - Download the apps "Waypoints and Routes" and "Maps r.485" (https://apps.garmin.com/en-US/apps/1e252dad-747c-4bf5-b7f8-74606b5d713e and https://apps.garmin.com/en-US/apps/3f07431a-07fe-474f-bc4c-4097bba106b2
    - Open "Waypoints and Routes"
    - Make sure the watch is connected to your phone and that you have internet access
    - Open the menu (press or press+hold the right button)
    - Choose the option "Save new address"
    - Enter a valid address, preferably near your current location
    - Save the address (once the location is found, you'll be given the possibility of choosing a save slot and a name)
    - Then you should see something like a compass. If you have a GPS fix, you'll see the distance and the direction to the saved location.
    - Now make sure that you have a GPS fix. It'll be necessary to calculate the route
    - Open the menu again
    - Choose the option "Google Directions"
    - Once a route is found, you'll have two options: "Open with...", and "Save"
    - Choose "Open with..."
    - Select "Maps r.485" and tap the icon.

    If I follow these steps on my Fenix 5S, "Maps r.485" opens and I can navigate. On the Vivoactive HR, nothing happens. It seems that the request (i.e. the intent to open "Maps r.485") hangs. If I tap the icon again - which triggers Toybox.System.exitTo(intentToMapsR485) again, I get the PreviousOperationNotCompleteException.

    _________
    Remarks:
    - Since I reported the problem, I updated the app to allow users to open the saved locations with the native navigation app. This functionality works fine. The problem is only when trying to open a route with one of my own apps.
    - I haven't tried with FW 4.14 beta, but one of my users reported that the issue remains on the newer FW 4.30.
  • Former Member
    Former Member
    r.485,

    I don't think giving up is the right option here. We've been trying to work through what's going on on our side. I'm still able to reliably launch a saved address following the reproduction steps provided. Is this still something you are seeing on your device are we just seeing this with the one user? I'm trying here for you. I'm just not seeing the same results no matter the angle I'm taking on it. Is there a specific route that they are trying to take? I'm starting to to think that there is something other than a general issue with exitTo() involved here.

    Thanks,
    - Coleman