文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Google Android Emulator Tutorial

Google Android Emulator Tutorial

时间:2009-04-10  来源:goandroid

Hello Android fans and developers. I'd like to share with you some emulator skins I created for the Google Android SDK. They are tested to work with the latest Android SDK version 1.0r1.

Installation of new Skins

Unpack the .zip file and copy the created directory and files to ./tools/lib/images/skins/ within the installation directory of the Android SDK.

If you have eclipse running restart it to refresh the list of available screen sizes in the run configuration.

Go to -> Run -> Run Configurations... -> Target -> Emulator launch parameters and choose your new skin.

Using a blank screen as Skin

If you are not in the need for fancy devices showing in the emulator window, want to waste as little screen property as possible for the emulator and are prepared to use the keyboard shortcuts to maneuver the emulated Android device, then you may start the emulator adding the simple command line option -skin ­­<width>x<height>.

For example, using the option -skin ­­320x480 will provide you with a small window in the standard resolution of the HTC Dream / T-Mobile G1.

This is a great and fast way to test various display resolutions without the need for a dedicated skin to be created first.

Changing the window size of the Android Emulator

For those of you developing on a typical notebook the skins with resolutions of VGA and above may produce an emulator window that doesn't fit onto the desktop anymore. Since using a skin with a lower resolution might position the Android screen objects in a different way it may not desirable to retreat to those if testing is needed for high resolution devices.

The solution is to append the parameter -scale ­­<scale factor> to the Emulator launch parameters. In eclipse, put it in the field "Additional Emulator Command Line Options" within the Run Configuration.

Allowed scale factors are those between 0.1 and 3, although the most common will probably be -scale 0.5 .

Controlling the Android Emulator through keyboard keys

Keypad keys only work when NumLock is deactivated.

Controls for the Android OS
Keyboard OS function
Escape Back button
Home Home button
F2, PageUp Menu (Soft-Left) button
Shift-F2, PageDown Star (Soft-Right) button
F3 Call/Dial button
F4 Hangup/EndCall button
F5 Search button
F7 Power button
Ctrl-F3, Ctrl-KEYPAD_5 Camera button
Ctrl-F5, KEYPAD_PLUS Volume up button
Ctrl-F6, KEYPAD_MINUS Volume down button
KEYPAD_5 DPad center
KEYPAD_4 DPad left
KEYPAD_6 DPad right
KEYPAD_8 DPad up
KEYPAD_2 DPad down
Controls for the Android Emulator
Keyboard Emulator function
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
KEYPAD_MULTIPLY increase onion alpha
KEYPAD_DIVIDE decrease onion alpha

Creating an SD card for use in Android Emulator

To create an image of an SD card we use the command mksdcard -l <label> <size>[K­|M] <file>.

For example, to create a small SD card for testing purposes we might use the command mksdcard -l SD256M 256M sd256m.img to receive a 256MB image named sd256m.img. The resulting file is a standard FAT32 image file that can be mounted as such and prefilled with files we later want to use within Android. To tell the Android Emulator to use an SD card, we append the parameter -sdcard <imagefile> to the emulator command line options where "imagefile" includes the whole path to the file.

相关阅读 更多 +
排行榜 更多 +
领土争夺战游戏

领土争夺战游戏

休闲益智 下载
怎么做才能不被男友甩掉游戏

怎么做才能不被男友甩掉游戏

休闲益智 下载
拆迁模拟器2手机版

拆迁模拟器2手机版

休闲益智 下载