views:

41

answers:

2

Hi,

I'd like to receive a TouchEvent in my Android application any time the screen is touched. Even if my application is not in focus.

Is there an general even listener or intent filter I can write to achieve this?

The goal is to write system wide gesture engine. So for example, if the user swiped up and then down, a certain application would be launched regardless of where the user is.

Thank you,

+2  A: 

I'd like to receive a TouchEvent in my Android application any time the screen is touched. Even if my application is not in focus.

This is not possible from an SDK application. You are welcome to add this to your own custom firmware, though.

CommonsWare
A: 

You can however build your own Launcher application by either forking the existing or coding one from scratch with your gesture functionality.

It will only work from the launcher tho. This is the only possibility if you want to have such a feature without building your own custom firmware.

Octavian Damiean
Hi, can you elaborate on this? How will implementing a launcher allow me to track touch events in other applications?
oneself
Like I stated above it will only work in your launcher application. In other applications it won't work. Like CommonsWare said it is not possible from an SDK application. Just think about it. Bobs application uses the swipe up gesture to trigger an action and now yo application listens globally on this event ... this will lead to problems.
Octavian Damiean