I would like to build an overlay that intercepts all touch events, registers them, but it is basically transparent and lets the touch events (and all other gestures) interact with the underlying apps.
What i've tried so far are the solutions proposed here
Android overlay to grab ALL touch, and pass them on?
Android : Multi touch and TYPE_SYSTEM_OVERLAY
but i'm able either to have a "transparent" that lets pass all touch events to the underlying apps, or an overlay that intercepts all touch events without letting them "pass down".
For what i've read and tried so far, it seems to be a security limitation, from Android 4.x and maybe this cannot be done at all.
I'm open to any kind of solution, thus maybe there is a way of making this work with root permissions, or using NDK, or dunno what else, as i'm quite new to Android programming.