Cover by Marko Gargenta

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

The Emulator

Running your application on a physical device versus an emulated device is pretty much the same thing. That is because the emulator is an actual code emulator, meaning it runs the same code base as the actual device, all the way down to the machine layer.

Tip

A simulator and an emulator sound very similar, but are fundamentally different. To emulate means to imitate the machine executing the binary code. So, an emulator is sort of like a virtual machine. A simulator merely simulates the behavior of the code at a higher level. Android SDK ships with a true emulator, based on QEMU.

To use the emulator, we’ll have to create an Android Virtual Device (AVD). The easiest way to do that is to start the android tool via Eclipse.

To create a new AVD, start the tool called Android SDK and AVD Manager (see Figure 3-3). You can start this tool from Eclipse by clicking on the icon or via the command line by starting the tool called android, which is located in your SDK/tools directory.

Android SDK and AVD Manager

Figure 3-3. Android SDK and AVD Manager

From within the Android SDK and AVD Manager window, choosing “New…” pops up a Create New AVD dialog window (see Figure 3-4). In this dialog, you specify the parameters for your new AVD. The name can be any name you choose. The target designates which version of Android ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required