dacongy
dacongy

Reputation: 2552

android i/o events

I/O events like keyboard inputs and hardware buttons are handled through /dev/input/event*. How about device rotations? What is the low-level mechanism, and how can we do record-n-replay as we would for /dev/input/event*?

Upvotes: 0

Views: 117

Answers (1)

Shachar Shemesh
Shachar Shemesh

Reputation: 8583

I don't have the precise mechanism, but the general idea is that rotation is handled by the accelerometer. I am fairly, but not entirely, sure that it is also available via a /dev/input/event mechanism, but if not, it is probably some other, similar, method (i.e. - a character device).

Also note two things. The first is that you do not have to actually write your own kernel level driver mimicking the precise protocol. You can write your own protocol, and then write a user-level driver to drive these events into the Dalvik infrastructure.

Shachar

Upvotes: 1

Related Questions