通过Java编程语言在android中读取/ dev / input / event [英] Read /dev/input/event in android via Java programming language
问题描述
/ dev / input / event *来获取输入事件。请指导我,以便如何通过Android活动执行相同操作。
您可以在root root手机上只要。有关于如何注入事件的示例,请访问: http://www.pocketmagic.net/?p = 2640 。要获取事件,只需在/ dev / input上进行读取即可。
还可以看看Android源代码中包含的GetEvent应用程序。它只是这样。
I want to record all the input events done across the android phone, save it in some file and later use that file to see what user input has happened at what time. AFAIK, i should invoke /dev/input/event* to get the input events. Please guide me so as to how can I do the same via an Android Activity.
You can do it on a rooted phone only. There is a sample on how to inject events, here: http://www.pocketmagic.net/?p=2640 . To get the events, simply do a read on /dev/input .
Also have a look on the GetEvent application, included in the Android source code. It does just that.
这篇关于通过Java编程语言在android中读取/ dev / input / event的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!