Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Access to physical buttons in clock faces

ANSWERED

Hello,

I've read the documentation for the physical buttons here

 

https://dev.fitbit.com/guides/user-interface/javascript/#using-the-physical-buttons

 

but just wanted to check if they are available to clock faces, and any limitations (eg not allowed to override the back button)

 

Thanks,

NiVZ

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Jon wrote the following in response to another thread:

"Clocks do not support buttons, but you can use touch events to navigate to a different screen within a clock."

 

Also, the glossary says this for "clock face":

"Clock faces are a special type of app that are primarily used to display the current date and time. Each device has a single clock face installed at any time, and interaction is limited to touch events only."

 

I'd love for some clarity on which sorts of touch events are available and why they might only be used to navigate to other screens within the clock app. It seems that if a clock app could detect touch events, it could emulate a button. Does FitBit handle touch detection and screen nav in clock apps?

View best answer in original post

Best Answer
5 REPLIES 5

Jon wrote the following in response to another thread:

"Clocks do not support buttons, but you can use touch events to navigate to a different screen within a clock."

 

Also, the glossary says this for "clock face":

"Clock faces are a special type of app that are primarily used to display the current date and time. Each device has a single clock face installed at any time, and interaction is limited to touch events only."

 

I'd love for some clarity on which sorts of touch events are available and why they might only be used to navigate to other screens within the clock app. It seems that if a clock app could detect touch events, it could emulate a button. Does FitBit handle touch detection and screen nav in clock apps?

Best Answer

Our touch events are currently prefixed "mouse", but they're really "touch". We have `onmouseup`, `onmousedown` and `onmousemove`.

 

https://dev.fitbit.com/guides/user-interface/javascript/#touch-events

 

Screen navigation (at the moment), is really only showing and hiding a container element in SVG.

 

There really is no difference between an app and a clock face, other than:

  • You can only have 1 clock face installed.
  • You can't use the physical buttons in a clock face.

I hope that helps.

Best Answer

I want to change the view of the watchface.

For this I use the mouseup event, but the view also switches if I swipe to the menu.

How can I realize, that the view only changes if I don't go to the menu etc.?

Best Answer
0 Votes

Use the onclick event instead.

Best Answer
0 Votes

Thanks, then I got it wrong. Thought there were only mouse events

Best Answer
0 Votes