Thanks for your help. I know that I can get root privilege only on my dev phone, and I will not try to really handle these events by myself.
On Oct 23, 11:55 am, Dianne Hackborn <[email protected]> wrote: > You can't handle input events in native code, the framework takes care of > that and you will break things if you fight with it (and can't anyway > because you shouldn't have permission to open the driver). > You can look at EventHub.cpp and KeyInputQueue.java to see how the framework > transforms the raw driver events into the MotionEvent and KeyEvent objects > your app receives, but you can't do anything like that in an application. > > > > > > On Thu, Oct 22, 2009 at 8:37 PM, ZaichengQi <[email protected]> wrote: > > > If I paste on the wrong group, please warn me. > > > Hello,I‘m now learning how android handles linux input events from > > kernel raw input events to the userland level KeyEvent and so on. And > > I want to handle input events in native language. I've do some > > experiments on handling events using NDK but the touch screen events > > are very hard to handle(when I touch the screen, It generates a lot > > of > > kernel events). > > > I've read the eventhub class in framework base dir in the android > > source repo. And I now I know how android collects linux kernel raw > > events using eventhub class by reading from /dev/input/event* , but I > > still have no idea how it translates these raw events into the > > userland logic input events like KeyEvent. The file keyinput service > > only wrappers eventhub to JNI functions but there are no translation. > > > So please give me some hints on the kernel event and userland event > > translation process. > > > Thanks in advance. > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

