Open main menu

DAVE Developer's Wiki β

Changes

Android Development Model

344 bytes removed, 07:57, 1 October 2012
Android Tools
** A daemon, which runs as a background process on each emulator or device instance.
You can find the adb tool in <sdk>/platform-tools/.
* [http://developer.android.com/tools/help/monkeyrunner_concepts.html MonkeyRunner]: The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes, . See for example to emulate input events as button pressing:<br><pre># Imports the monkeyrunner modules used by this programfrom com.android.monkeyrunner import MonkeyRunner, MonkeyDevice # Connects to the current device, returning a MonkeyDevice objectdevice = MonkeyRunner.waitForConnection(10,"emulator-5554") # Presses the Home buttondevice.press('KEYCODE_HOME',MonkeyDevice.DOWN_AND_UP)</pre>[[Button Pressing Emulation On Android]]
* [http://developer.android.com/tools/help/logcat.html logcat]: The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers, which then can be viewed and filtered by the logcat command. You can use logcat from an ADB shell or directly on the serial console shell to view the log messages.