Highlighted

TouchEvent touchPointID is always 0 on Android

Contributor ,
Dec 19, 2014

Copy link to clipboard

Copied

With AIR 16.0.0.245 app running on Android devices, I'm having a problem getting meaningful touchPointID values for single taps. The value is always reported as 0. This makes it impossible for me to track if a given TouchEvent is actually the same TouchEvent occurring in a different phase.

When I run the same code on iOS, subsequent touches increase their ID with each tap, which is as expected. I am getting the exact same positive results on both platforms from Multitouch.supportedGestures, Multitouch.supportsGestureEvents, and Multitouch.supportsTouchEvents. Multitouch.inputMode also reports touchPoint.

This is crippling my project right now.

TOPICS
Air beta

Views

392

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

TouchEvent touchPointID is always 0 on Android

Contributor ,
Dec 19, 2014

Copy link to clipboard

Copied

With AIR 16.0.0.245 app running on Android devices, I'm having a problem getting meaningful touchPointID values for single taps. The value is always reported as 0. This makes it impossible for me to track if a given TouchEvent is actually the same TouchEvent occurring in a different phase.

When I run the same code on iOS, subsequent touches increase their ID with each tap, which is as expected. I am getting the exact same positive results on both platforms from Multitouch.supportedGestures, Multitouch.supportsGestureEvents, and Multitouch.supportsTouchEvents. Multitouch.inputMode also reports touchPoint.

This is crippling my project right now.

TOPICS
Air beta

Views

393

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 19, 2014 0
Contributor ,
Dec 19, 2014

Copy link to clipboard

Copied

I've tried setting and removing the following manifest settings, to no avail:

<uses-feature android:name="android.hardware.touchscreen" android:required="true" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true" />

<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="true" />

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 19, 2014 0
Toxikman LATEST
New Here ,
Jan 09, 2015

Copy link to clipboard

Copied

Just count the number of TOUCH_BEGIN events with touchPointID of 0 to determine if it's a new touch or not. The touchPointID starts at 0 (whereas iOS starts at 1), but a second finger will report 1, then 3rd finger 2, etc.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 09, 2015 0