Issue
In native_app_glue.c, the use of ALooper seems a little extraneous; I have my own running engine loop which I presume I could use to pull events out of the file descriptor that ALooper uses. However, I'm aware that it does some threading stuff under the hood, and don't want to miss that.
It is possible to manage input frame by frame from my own code, without using ALooper? How?
P.S. An explanation of what I'd need to synchronise, and why, would possibly help greatly.
Solution
Short of doing unsupported things (like access the fabled file descriptor which I believe holds the raw input information and may reside in different places on different devices), it seems ALooper is indeed the only reasonable way to get at input information. Apparently this is because Loopers are central to the entire application lifecycle and bearing in mind that Android is primarily Dalvik-focused, even pure C / NDK code has to approach such issues through canonical means.
P.S. I'd love to heard otherwise, but a fair amount of research has led me to the above conclusion.
Answered By - Engineer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.