Don't call private native methods (NDK/C level) • Don't use Runtime.exec • "adb shell am" to communicate with other process is not something we want to support
process messages from handlers ◦ Takes the next task, executes it, then takes the next one and so on ◦ One looper per thread • Handler ◦ Set of methods to post messages
mThread = Thread.currentThread(); } /** * Run the message queue in this thread. Be sure to call * {@link #quit()} to end the loop. */ public static void loop() { final Looper me = myLooper(); // ... for (; ; ) { // ... } infinite loop