mattprecious/telescope

Devices with only 2 fingers support

tasomaniac opened this issue · 4 comments

Hi,

I've been using the library and it is really helpful.
I have a rooted Nexus 6 with some gesture application. It was interfering with multi-touch events and 3+ pointerCount was not working. I had the same issue with another cheap Android device. Since I have 2 devices not working I started debugging the library and spent ~3 hours. 😄 I forgot that I had that gesture application installed.

Since I have multi-touch pan-zoom features in my app, I want to use pointerCount 3.
For the other cheap device, I used FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND in PackageManager to detect the device. This feature gives us that the device is capable to detect 5 fingers.

I assumed that there are no devices that detect only 3-4 fingers. It should be either 2 or 5 or 5+.

Do you think the library should have some built-in mechanism to detect this and adjust itself? Like make pointerCount 2 if the device is not capable to detect 5 fingers? Or at least give warning to developers.

What do you think? Depending on your comment, I would like to open a PR.

I don't think we'd want to change the amount based on device (automatically at least).

We've trained our testers who are not the most tech-savvy individuals about the two-finger gesture and if it suddenly became another number without warning they'd be lost and would probably just give up filing the bug. That said, since we only use 2 fingers this is unlikely to be a problem for us, but I would imagine there's similar concern by others who are using 3 (or more?).

Not sure what to do about the cases where you're using more than 2 though. I didn't realize there were devices like this.

Yes, I agree that we shouldn't be automatically changing the pointer count. It needs to be consistent or else people will get confused. It also seems wrong to reduce the number to 2. If you've picked a higher number (like 3), this is usually (always?) because you have conflicts with two finger gestures. If we automatically changed it to 2 it would now start intercepting touch events that you need in your app.

It's probably worth looking at exposing a manual trigger API so you can trigger a screenshot through other means in your app. Maybe adding a button to your debug drawer that closes the drawer automatically and triggers a bug report...

We have Google Maps in the app and 2 fingers simply interfere with zooming gesture.

Applications that use the library with 2 fingers won't be affected at all.

The weird thing is that library is not working at all when we set pointerCount to 3 on such devices. The user cannot even pass the initial tutorial because tutorial is a must and back button is blocked.

Something must be done.

What I did in my app was to make the pointerCount dynamic depending on devices capability. I also put that number in the training dialog. And disabled telescope in Google Maps.

That something to be done may even be a warning in the Readme of the repo. I don't want some other developer to work for 3 hours for nothing to figure out why it is not working. :)