Question

Background:

I'm making a little test app on Android that just displays on screen all data the app can sense about all fingers touching the screen. It is similar to this one, but for all touches instead of just one. Android touch events contain lots of data (as per this doc), including position, orientation, pressure, size, and ellipse axis lengths.

Problem:

Every MotionEvent my app receives reports 0 (zero) for getSize(i), getTouchMajor(i), and getTouchMinor(i) for every pointer index i. But it reports sensible, nonzero position and pressure values, so something's working right. The docs seem to suggest that this means the hardware does not support that information, but I'm skeptical about that for two reasons.

  1. The device on which I'm testing is a Galaxy Tab II, which I thought was pretty fancy. (I searched the web to see if I could find a list of features that various Android devices supported for MotionEvents, but failed to find such a list.)
  2. I used the Java method InputDevice.getMotionRanges() to test whether the device supports size and major/minor axes, and those results suggest that the device does support those axes (I got size: 0.0-1.0, major/minor: 0.0-1509.437 each).

Questions:

  1. Am I correct in concluding that a Galaxy Tab II supports the size and major/minor axis features of MotionEvent, and if so, why can't I get that data from actual MotionEvents? (My code is very much like the code linked to above.)
  2. If this tablet doesn't actually support those axes, can you recommend what Android tablet I could be doing this on that would give me MotionEvent sizes and ellipse axis lengths?

Thanks in advance for any help available!

Edit: Coworkers testing the app on a Galaxy Tab I get all the data, none missing. Is there some configuration/setting difference we might have between the devices? It seems very strange that the Galaxy Tab would downgrade from I to II...

Was it helpful?

Solution

I answered this on a similar question. onTouch MoitonEvent getTouchMinor and getTouchMajor alwasys the exact same number result, why?

In our findings we found no device that gave different major and minor lengths for an ellipse, or that could give an orientation of such an ellipse.

Most devices we tested only gave one value which, we believed to be the diagonal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top