Android Emulator
Android Emulator
Android Basics
Environment Emulator Elo A. Ogardo
Android Emulator
• The Android SDK includes a mobile device emulator -- a virtual mobile device that runs on your
computer.
• The emulator lets you prototype, develop, and test Android applications without using a physical
device.
• The Android emulator mimics all of the hardware and software features of a typical mobile device,
except that it can not receive or place actual phone calls.
• It provides a variety of navigation and control keys, which you can "press" using your mouse or
keyboard to generate events for your application.
• It also provides a screen in which your application is displayed, together with any other Android
applications running.
Android Emulator v1.5 Skin
Status Bar – Notification Line
Power
Volume
Tab
Launch
Pad
Menu
Home Back
Call Hang up
Status Bar – Notification Line
Volume
Power
Call
Hang up
Home
Menu Back
Tab
Launch
Pad
Tab Status Bar – Notification Line
Launch Volume
Pad
Power
Call
Hang up
Home
Menu Back
Android Emulator Keyboard OS function
Escape Back button
Home Home button
F2, PageUp Menu (Soft-Left) button
Shift-F2, PageDown Start (Soft-Right) button
F3 Call/Dial button
Controlling the Android Emulator F4 Hangup / EndCall button
F5 Search button
through keyboard keys F7 Power button
Ctrl-F3, Ctrl-KEYPAD_5 Camera button
Keypad keys only work when Ctrl-F5, KEYPAD_PLUS Volume up button
Ctrl-F6, KEYPAD_MINUS Volume down button
NumLock is deactivated. KEYPAD_5 DPad center
KEYPAD_4 DPad left
KEYPAD_6 DPad right
KEYPAD_8 DPad up
KEYPAD_2 DPad down
F8 toggle cell network on/off
F9 toggle code profiling (when -trace option set)
Alt-ENTER toggle FullScreen mode
Ctrl-T toggle trackball mode
Ctrl-F11, KEYPAD_7 switch to previous layout
Ctrl-F12, KEYPAD_9 switch to next layout
Android Emulator
By default, the Emulator always looks for the disk images in the
private storage area of the AVD in use (c:\android-sdk-
windows\platform\ … ) . .
Android Emulator
Working with Emulator Disk Images
If no platform images exist when the emulator is lunched, it creates
the image in the AVD directory based on default versions stored in
the SDL.
Note:
The default storage location for AVDs is in
If you are working in Eclipse, the ADT plugin for Eclipse installs your application
and starts the emulator automatically, when you run or debug the application.
Provide a Name,
choose an Android target,
create a new SD card with about
2Gb, choose a screen type,
add hardware devices…
The –t (target) argument sets up a mapping between the AVD and the system image
that you want to use whenever the AVD is invoked. Later, when applications use the
AVD, they'll be running on the system that you specify in the -t argument.
To specify the system image to use, you refer to its target ID — an integer — as
assigned by the android tool. The target ID is not derived from the system image name,
version, or API Level, or other attribute, so you need to have the android tool list the
available system images and the target ID of each, as described in the next section. You
should do this before you run the android create avd command.
Example: Creating an AVD using the android tool
After listing all targets (see previous image) we have decided to make a
profile based on target id:4 to support SDK1.6 with Google API
Mapping libraries. It should also include a 1Gig SD card. We enter the
command
1. Use the program ddms to push files into the SDcard (the emulator must
be running with the SD card attached to it).
2. Click on: Device > File Explorer, this will open a new window and there you will
select the SDcard.
• Open a Windows Explore panel to drag & drop files/folders on the card, or
( DDMS stands for Dalvik Debug Monitor Services. The program is located in the /tools folder of the SDK. Also available
in Eclipse perspective – Top upper right icons)
References
http://developer.android.com/index.html
http://developer.android.com/guide/developing/tools/emulator.html
END
Thank you!