Search code examples
androidlinuxeventsinputandroid-event

How to get just some events from an Overlay that sees in the top of all applications in Android


Im trying to develope an app which is an Overlay working on top of all aplications in the system, till there I dont have problems. The issue is that my overlay has to be able to manage some events and others just let them go under it.

Example:

The App has to manage onFling events and do some operations. The App must not manage onClick events, letting them go to the activity posicionated under its


Solution

  • I have found some information about how to do that, although you need to have root permissions to inject events in the system or another app running on it.

    Here you can find further information :

    http://www.pocketmagic.net/2012/04/injecting-events-programatically-on-android/#.UReb1KWIes0

    http://www.pocketmagic.net/2013/01/programmatically-injecting-events-on-android-part-2/#.UReb3aWIes2