07-04-2018 02:15
07-04-2018 02:15
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?
07-04-2018 02:23
07-04-2018 02:23
Mouse click.
07-04-2018 02:26
07-04-2018 02:26
@Gondwana wrote:Mouse click.
Doesn't work for me, that was the first thing I tried.
07-04-2018 02:34
07-04-2018 02:34
Works for me; you must be trying to detect the events differently to me.
07-04-2018 02:50
07-04-2018 02:50
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:
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.
07-04-2018 13:46
07-04-2018 13:46
Untested guesses:
07-04-2018 22:44 - edited 07-04-2018 22:45
07-04-2018 22:44 - edited 07-04-2018 22:45
Make sure your other interface elements have
pointer-events="none"
or that the active ones are topmost in z-order (i.e., declared last).
07-05-2018 02:48
07-05-2018 02:48
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.
07-05-2018 06:08
07-05-2018 06:08
It could be some element (a line, a piece of text etc) interfering with some regions of your image. Try my suggestion from above.