Complications.exitTo() for non-native apps possible?

The docs are a bit unclear as to the ability to launch non-native complications app publishers.  The Core Topics says this: "Some Connect IQ products have a feature where pressing and holding on a complication launches the associated app. You can add this functionality to your watch face by implementing ..." which implies that exitTo() only works with some Connect IQ products.  However, the class reference for exitTo() does not specify an limitations.

So, can we launch non-native apps via Complications.exitTo()??

Thx,

Pete 

Top Replies

  • The docs are a bit unclear as to the ability to launch non-native complications app publishers.  The Core Topics says this: "Some Connect IQ products have a feature where pressing and…

All Replies

  • hi, I haven't tested it yet but I guess it can be done;

    Complications.exitTo(mComplicationId);

    where mComplicationId would be the publishing app complication id
  • and I think this is why there is a try catch, if user delete the publishing app

  • The docs are a bit unclear as to the ability to launch non-native complications app publishers.  The Core Topics says this: "Some Connect IQ products have a feature where pressing and holding on a complication launches the associated app. You can add this functionality to your watch face by implementing ..." which implies that exitTo() only works with some Connect IQ products.  However, the class reference for exitTo() does not specify an limitations.

    I think you may be misinterpreting the docs, but that's on Garmin because they don't use consistent terminology.

    In this context, "Connect IQ products" probably means "devices which support Connect IQ", not "Connect IQ apps". Garmin also uses "device" and "product" interchangeably in the VS Code Monkey C extension - e.g.

    - "Monkey C: Build for Device"

    - "Monkey C: Edit Products"

    With this interpretation, the documentation for Complications.exitTo() actually does specify the limitation in question, with a list of supported devices. (Notice that other methods don't have a list of supported devices, because they apply to all devices which support complications)

    Note that the device list for Complications.exitTo() is shorter than the list of devices which support Complications:

    My educated guess is they wouldn't prevent you from launching a non-native app, same as how System.exitTo() can launch either native or non-native apps.

  • Which SDK and device?  Sim or real device?  Do you see the onPress()?

  • Thanks, that makes sense.  I was wondering about the use of products and devices and you're description makes sense.  Some of my concern also came from that fact that the System.exitTo only works with native apps (if I recall correctly).

    Mainly, I didn't want to waste time with complications support in my apps if it was not possible to launch them.  Now I'll go for it Slight smile

    Thx

  • I have a widget that publishes, and a watchface that consumes. With a 965 target and the 4.2.1 SDK, I can see the onPress and exitTo(), the widget is launched when the WF is "Pressed".

    It doesn't seem to work for me with the 955 in the sim

  • Here's the onPress code I'm using.  myCompId3 I save off when the WF starts.

        function onPress(evt) {
            Complications.exitTo(view.myCompId3.complicationId);
            WatchUi.requestUpdate();
            return true;
        }