Skip to main content
stolennickname
Inspiring
December 19, 2014
Question

TouchEvent touchPointID is always 0 on Android

  • December 19, 2014
  • 1 reply
  • 578 views

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.

This topic has been closed for replies.

1 reply

stolennickname
Inspiring
December 19, 2014

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" />

Participating Frequently
January 9, 2015

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.