Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Multitouch.maxTouchPoints return incorrect value #2770

Closed
itlancer opened this issue Aug 17, 2023 · 1 comment
Closed

[Android] Multitouch.maxTouchPoints return incorrect value #2770

itlancer opened this issue Aug 17, 2023 · 1 comment
Labels

Comments

@itlancer
Copy link

Problem Description

Multitouch.maxTouchPoints return incorrect value with Android devices which support more than 2 touch points simultaneously.
Multitouch.maxTouchPoints return 2 in such cases instead of 5.
So using AIR you cannot detect capabilities of touch screen.

Tested with different AIR 50.2 versions (even with latest AIR 50.2.3.3) with multiple different Android devices with different OS versions, different AIR applications and architectures.
Same problem in all cases.
Many years ago in ~AIR 19 all works fine.

Steps to Reproduce

Launch application with code below with any Android device which support more than 2 touch points.
Application example with sources attached.
android_maxtouchpoints_bug.zip

trace(Multitouch.maxTouchPoints);

Actual Result:
Multitouch.maxTouchPoints return 2.

Expected Result:
Multitouch.maxTouchPoints return 5 (in terms of https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND).

Known Workarounds

none
Write native extension for that.

context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH));//true
context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT));//true
context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND));//true
@itlancer itlancer added the Bug label Aug 17, 2023
@itlancer
Copy link
Author

Fixed with latest AIR SDK 50.2.3.4.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant