Listening touch event while application is not visible

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Listening touch event while application is not visible

Postby Hebus » Thu May 14, 2009 4:06 pm

Hello!

I need some help on a topic that I hope is feasible.

What I wan't to achieve is an invisible security system, that will listen for the user tap of screen and copare it to a pre-entered pattern (a behavior similar to the default unlock pattern).
If the pattern is not valid, the application let the user access the screen but log which app are used on the phone.
If the pattern is valid the application just exit, eventually notifying that the phone has been used by another individual (if any).

To perform this, I will need to catch touch events, while my application remains invisible (so that the unauthorized user doesn't know about it).

I've been searching around for a solution :
- I thought about using a service that uses Sensor listener, but touch screen doesn't seem to be part of the sensor lists of sensormanager. (and btw, the home screen or whatever application is launched while entering the pattern should not be awware of touch event as it might cause unwanted actions)
- So I would like to set up a fully transparent activity wich task will only be to capture touch events. I don't know if it is feasible and I haven't found anything about it.

Does someone know how could I perform this?
Any suggestions?

thanks in advance!
Hebus
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Apr 15, 2009 1:10 pm

Top

Postby Hebus » Mon May 18, 2009 2:27 pm

I just found out a possible solution.
It would use the /dev/input/event1 metafile to monitor events directly.

In this file, informations are provided raw so it will need some processing.
Also, portability may be insured.

I'm looking for more informations about raw data that is reported there...
Hebus
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Apr 15, 2009 1:10 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 14 guests