Using onPress to go to watch face settings menu

Long shot. Browsing the store I noticed a watch face that claims to go to watch face settings with press and hold. I can't remember the watch face, but tried to implement it like this:

public function onPress(clickEvent) {
    if(ttrtouchandhold>-1) { // enabled
      var coor = clickEvent.getCoordinates();
      var cx = width/2 - width/10;
      var cy = height/2 - height/10;
      var cwidth = width/5;
      var cheight = height/5;
      warning("Click on "+coor[0]+","+coor[1]+" Center is "+cx+","+cy+" width="+cwidth+", height="+cheight);
      if(coor[0]>cx&&coor[0]<cx+cwidth&&coor[1]>cy&&coor[1]<cy+cheight) {
        warning("center press");
        $.timetorecoverApp.getSettingsView();
        //WatchUi.pushView(new $.ttrSettingsMenu(),new $.ttrSettingsMenuDelegate(),WatchUi.SLIDE_IMMEDIATE);
        return true;
      }
   [...]
}
$.timetorecoverApp.getSettingsView(); does nothing
WatchUi.pushView(new $.ttrSettingsMenu(),new $.ttrSettingsMenuDelegate(),WatchUi.SLIDE_IMMEDIATE); returns error as aspected:
Error: Unhandled Exception Exception: Page control not allowed in current app type (or mode) - Watch Face
I wonder is there any way to achieve this?
 
  • No sorry, I just noticed it and added it on my to do list. If I find it again I'll let you know, however my guess is that they made some options available through onPress like I do. Currently I have the possibility to customise the behaviour for onPress through the settings to choose one action. The concept I have in mind is to devide the screen in 4 or 6 parts to add 4-6 actions and a middle press to activate and use the timeout of middlepress again to deactivate. You might start a subscreen of actions from one action to show a next screen of actions. I'll try to build this weekend and post a video.

  • I have created a quick settings overlay using the onPress function as added value to owners with a touchscreen.

    You might add some page control or more sections for more options, I hope this inspires thinking out of the box for user interaction.

    Sneak peak on my working environment as well ;). 

    https://youtube.com/shorts/7de9Nhu9bg0?feature=share