简体   繁体   中英

Android - How to monitor the screen from a background process?

I would like to write a background process on Android to monitor the screen (not by taking screenshots).

I don't really need to record the screen; I want to process the frames and then perform some corresponding actions on the phone.

What is the way to do this ?

Root required?

So you want to snoop on somebody and make a keylogger,lol.The screen and all its stuff (buttons, frames,layouts) fires events when you mess with it. For example click on a button and a buttonClick event fires. If you change the orientation an orientation event fires. If your code wants to do something about an event you need to register an event listener. Most event listeners consume their events what you want to do is just take notice and throw the event. I hope this http://developer.android.com/guide/topics/ui/ui-events.html helps. Like I said if you add any "view" and by this I mean frame button etc a property change event will fire and you want to passively listen good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM