If I touch with one finger, a circle is displayed (at it’s position)
If I touch with a second finger, a second circle is displayed
If I pull up the second finger without changing the position of the first one, the second circle still is being displayed
Only if I move or let go of the first finger, the second circle also disappeares.
Interestingly, the touchEnded() function is still correctly executed when letting go of the second finger.
It’s easiest to test this by holding one finger steadily and then tapping with a second.
I’ve now tested it 5mins on my S22(Android 13) and have to say that I can’t reproduce it.
I’ve also looked at the processing code and the touches gets updated directly before triggering the touchStarted / touchEnded events, which means that both should have the same issue you described above…
Maybe you can check if the framerate drops or draw is called at all…
doesn’t seem like it drops the fps significantly…
I don’t really get what you mean by “or draw is called at all”, because obviously stuff is being displayed, so draw has to be called, or am I wrong?
This should show grey at the beginning,
then red if the last action was touchStarted()
and green if the last one was touchEnded()
color c;
void setup() {
fullScreen();
textSize(76);
textAlign(CENTER);
fill(255);
c = color(100);
}
void draw() {
background(c);
for (TouchEvent.Pointer p : touches) {
text(p.id, width*0.5, height*0.5+p.id*76);
push();
fill(255);
circle(p.x, p.y, 400);
pop();
}
}
void touchStarted() {
c = color(100, 0, 0);
}
void touchEnded() {
c = color(0, 100, 0);
}
Meant maybe graphics is persistent by the devices graphicbuffer. Would be still displayed but without getting updates from draw.
But as far as I spot it correct in your vid the frameRate text is flickering 59/60. So it definitely gets updated …
Nevertheless, I tried it once more to reproduce it on my mobile (+ on my old S9 Android 10) but still no luck. All fine on my device.
I just “achieved” this by tapping shortly with 4 Fingers?
Console doesn’t show any Errors, and the last Event apparently was touchStarted() as the background is red.
I can easily reproduce this about every fourth attempt.
This screen stays until I tap (or hold) again.
also works when using your code example that shows the fps and touches at the top, and the fps doesn’t drop and continues to flicker between 59 and 60. t: shows 0 1 2 3 as it does in my code, too.
it only “works” if the first finger isn’t moved.
On my mom’s Galaxy A5 2016 it was a bit difficult as even if I didn’t move my finger, it sometimes moved the detected touch of that first finger.