Temporarily switch to a new view from a watch face view

Hello,

Firstly, I apologize if this question has been asked before. I've searched and found nothing so here goes. Any help is appreciated.

I have created a watch face app. There is only a single view.

I am trying to temporarily display a simple second view with a message when a user reaches a percentage of one of the main goals (intensity minutes, floors etc.) but I am struggling with it. I have created classes for the second view along with an extended input delegate class but I am not sure where to use switchToView() (and for that matter whether I even can) to display the view from my main watch face view because of a "permissions" error. I am sure this is because I need to switch the view in the main app but that is where I am struggling.

Any help would be appreciated.

Thanks.
  • You can't use Ui.pushView() or Ui.switchToView() from a watch face. If you want to keep doing an actual watch face app type, you need to implement your own system.

    If all you want to do is handle the pre-existing goals, the App.AppBase class has AppBase.getGoalView() that is called when goals are reached.

    Travis
  • You can do this in a single view with a boolean, Ui.requestUpdate() and code to determine when the boolean is reset.

    If the boolean is set, display what you want, and a min later, reset the boolean. (most times a WF only updates every min)

    Or use colors to indicate 1/2 step goal, hit step goal, etc when you display steps...

    With GoalView, you can also see when various goal are hit...