Access serial port (/dev/tty*) incoming data without polling
问题 I use Gingerbread. I already talk to a native serial port (RS-232 native UART, not USB dungle). This is done through java.io and a small piece of native code written in C to open and close the stream and configure the baudrate. It works but my first thought was that it is not efficient because I need to setup a thread that constantly poll the inputstream to check if there are bytes coming from the serial port. What a wasteful way to use CPU and batteries. private InputStream mInputStream;