Sign in to follow this  
JoshKlint_34394

Android multitouch input

Recommended Posts

We have experience unexpected behavior on Android devices, using NDK and Android 2.2. The touchID values do not appear to be correct or consistent. Behavior is as follows:

Place one finger on device: touchID is 0.
Place second finger on device: touched is 1.
Move second finger: touchID is 1.
Move first finger: touchID is 1(!)
Remove second finger: touchID is 1.
Move first finger: touchID is 1(!)
Remove first finger: touchID is 0.

Is there a setting we need to specify in the project to make this work, or any other explanation for this behavior? Thanks.

Share this post


Link to post
Share on other sites
I have been coding on an android tablet for some time, and haven't noticed this kind of behavior (though I only own one device). I did not need to do anything special, reading the pointer id's worked ok.

Try downloading some of the free touch test or multitouch paint apps from the market, and see if they exhibit the same behavior on the problematic device. Perhaps that will help you pinpoint whether it's in the hardware, or in your code.


Share this post


Link to post
Share on other sites
It's quite possible that the touch device you're using is only semi-multitouch. That is, it reports the bounding box of the touch area and the number of touches, but that's it.

It's also possible the hardware driver is crap. That describes many of the Android drivers out there.

Do you get the same behaviour with various different devices or are you testing wit ha single device?

Share this post


Link to post
Share on other sites
Hidden
It's because there are two seperate APIs for single and multi-touch. Google kind of fubared support for multi-touch imo. You have to check for multitouch support and treat it differently. You can read about it here:
[url="%20http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html"] http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html[/url]

Hope that helps.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this