问题
When the touchscreen is tapped once, the finger touches multiple x,y positions on the screen by virtue of the finger being fat. But android only gives me one x,y position at a time (For example, if I use adb shell getevent, it gives me only one x-y coordinate at a time. Of course for a tap it gives multiple x,y positions since the tap lasts for some time and it gives the x-y position for each fraction of that time if x-y slightly changes.) At each instant there are more than 50-100 pixels that I am touching - presumably android uses some algorithm to reduce all the touch signals into one x-y position. Is there a way I can get those multiple raw touch signals at every pixel I am touching at the same time? I have a rooted device and am willing to delve into android source code if required.
回答1:
Android reports the total touch area as an ellipse through several MotionEvent APIs.
The major axis of the touch ellipse: MotionEvent.getTouchMajor()
The minor axis of the touch ellipse: MotionEvent.getTouchMinor()
The orientation of the touch ellipse: MotionEvent.getOrientation()
来源:https://stackoverflow.com/questions/18345300/how-to-get-the-all-the-raw-touch-points-at-a-particular-instant-for-a-tap