Android: get raw bitmap data from touch events

2019-05-30 20:50发布

问题:

Is there a possibility to get an array/bitmap with the raw data of the touched spots on an Android touch display? (See illustration)

So far I only know the commands event.getX(), event.getY(), event.getSize, ...

回答1:

It is not possible to do this in user space. The touch input driver, part of the kernel, is responsible for taking the 'bitmap' and converting it into different points. In order to accomplish what you are trying to achieve, you need to build a new android kernel whose touch drivers work differently. These new drivers would have to provide an API for interacting with the unprocessed data.