Appendix B. Using the Android Emulator

The Android Emulator ships with the Android SDK and is an invaluable tool to help test your application without requiring you to purchase a real device. While you should thoroughly test your applications on real devices before you deploy them, the emulator mimics most of the capabilities of real devices. It is a very handy tool that you should make use of during the development stage of your project. This appendix provides some common tips and tricks for mastering the Android Emulator.

USES OF THE ANDROID EMULATOR

As discussed in Chapter 1, you can use the Android Emulator to emulate the different Android configurations by creating Android Virtual Devices (AVDs).

You launch the Android Emulator by directly starting the AVD you have created in the Android SDK and AVD Manager window (see Figure B-1). Simply select the AVD and click the Start button. You have the option to scale the emulator to a particular size and monitor DPI.

Alternatively, when you run an Android project in Eclipse, the Android Emulator is automatically invoked to test your application. You can customize the Android Emulator for each of your Android projects in Eclipse. To do so, simply select Run

USES OF THE ANDROID EMULATOR

INSTALLING CUSTOM AVDS

Sometimes device manufacturers provide their own AVDs that you can use to emulate your applications running on their devices. A good example is Samsung, which provides ...

Get Beginning Android™ Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.