Ui.pushView no longer works as expected on SDK 3.1.5

Former Member
Former Member

Hi folks. We've hit a bit of an odd issue with our app. Users started reporting that after updating their devices to the latest firmware (specifically, Edge 820 firmware v12.10, which includes the 3.1.5 CiQ runtime), they were unable to get past the splash screen in our app.

I updated my SDK and fired up a 3.1.5 Edge 820 simulator instance, and sure enough, the app hangs on the splash screen. The bizarre thing is *where* it hangs. We do a number of things in the splash screen, but the important method here is `onConnectionAvailable`, which fires when the app detects that a bluetooth connection to the phone has been made.

In 3.1.5, this method IS FIRING, but the `Ui.pushView` call which has not been modified and has worked just fine since version 0.0.1 of our CiQ app appears to be a noop.

Here's the code in question:

And here's the log output:

So, we're getting to the `System.printLn()` call, which implies that the Ui.pushView() is being called and is just... silently failing in this new CiQ version with no debug info whatsoever.

I am unsure of how to proceed at this point, since given that it (1) worked in all previous versions of the CiQ SDK, and (2) appears to be silently failing without crashing our app or giving any debug messaging, this looks to me like a bug in the SDK/firmware rather than our app.

  • Former Member
    Former Member over 5 years ago

    Worth noting, I can make this work if I introduce an artificial 1 second delay into the mix before calling Ui.pushView. My guess is that 3.1.5 introduced some kind of constraint or race condition that prevents Ui.pushView from working until after some aspect of the view layer completes processing. Previously, when a phone was connected as the app was booting, the Ui.pushView would be called nearly instantaneously with splash screen show, which appears to be the source of the problem.

    We're going to go ahead and release a new version of our app that forces a 1 second delay at the splash screen, but I would love to see the underlying problem here addressed in some way so that we can go back to delivering the fastest possible experience for our users, without artificial delays!

  •  HI,

    The intention for getInitialView is to provide the base view for your app, as certain app types (watch faces and data fields) are not allowed to push views. Doing a view push, switch, or pop within getInitialView is an unsupported behavior, and you should only perform view stack operations after the onShow() call of the base view has been called. 

    Can you try invoking the onConnectionAvailable() in or after the onShow() call of the base view.

    Anshul