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

Versa simulator

I'm new to FitBit development (though have about 35 year software development experience), I've started experimenting with creating watchfaces and apps but I cannot get screen taps to work on the simulator. My app detects this fine on an actual versa but not on the simulator. Does the simulator produce the equivalent of screen taps? Or button presses? If so how?

Best Answer
0 Votes
8 REPLIES 8

Mouse click.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

@Gondwana wrote:

Mouse click.


Doesn't work for me, that was the first thing I tried.

Best Answer
0 Votes

Works for me; you must be trying to detect the events differently to me.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I define the image as :

  <image id="watchFace-1" class="clock-widget" href="background-1.png" pointer-events='visible' system-events='all' />

and in javascript&colon;

 

let face_1 = document.getElementById("watchFace-1");

face_1.onclick = function(e) {NextFace();}

 

This works fine on an actual Versa, NextFace() is called when I tap on the screen image but in the simulator clicking on the image nothing.

Best Answer
0 Votes

Untested guesses:

  • Try not using single quotes in the .gui.
  • Try using a rect rather than an image.
Peter McLennan
Gondwana Software
Best Answer
0 Votes

Make sure your other interface elements have 

pointer-events="none"

or that the active ones are topmost in z-order (i.e., declared last).

Best Answer
0 Votes

On further testing, this appears to be an intermittent issue. Sometime mouse clicks work and sometimes they don't. I haven't been able to track down any particular set of circumstances that stops clicks being triggered but will report back if I do discover anything. 

Best Answer
0 Votes

It could be some element (a line, a piece of text etc) interfering with some regions of your image. Try my suggestion from above.

Best Answer
0 Votes