listen to system events

  • Replies:4
  • OpenNot stickiedAnswered

Mar 6, 2014 10:22:32 AM via Website

Hi all,

I am very new to Android, in fact I still don' t know if I can do what I want in Android.

I want to make a small app (it will run on Tablet with Android os) that will run in the background (maybe a service?) and catch system events like touch or mouse. I want it to act something like a screen saver. It will have a timer that will fire a method each time the count goes to the defined limit.

Now, I ve seen a couple of posts related to this but, at list to me, its still foggy whether I can do that without problems.
My understanding so far is best described with what resumes from a StackOverflow post with the title: "How can a service listen for touch gestures/events?"
of which I cant type the link.

In the above post I see that I can do it but that will make it "interfere with the users ability to click buttons in the activity they think they are viewing"

????

So the questions is, can I do that?

Many thanks in advance.

— modified on Mar 6, 2014 10:32:10 AM

Mar 6, 2014 10:46:32 AM via Website

Of coure you can do this, but you need little expireince with Java and android, because you need seperate the gestures/touch events. The most you need is a broadcast reciver, wich recives, when an event action performed. But in playsorte there are some apps with the same function. You dont have to make it on your own because it already exists

LG Pascal //It's not a bug, it's a feature. :)

Mar 6, 2014 12:45:37 PM via Website

Thank you very much for replying.

I have strong experience in Java but none at all in Android.

The app I need to make must be able to execute another app that exists in the system (if it is not already playing) when a predefined period of time of system idle (no user touched the screen or mouse or any other input device) has passed.

You say that I can find such an app in google playstore? You remember one to point me (title or anything)?