Creating an Android emulator

An Android emulator can be created from the Android Virtual Device (AVD) Manager. You can start the AVD Manager by clicking on its icon on the Android Studio toolbar, as shown in the following screenshot:

Or, alternatively, by selecting Tools | Android AVD Manager from the menu:

On the Your Virtual Devices screen, click the Create Virtual Device... button:

If you already have an emulator created, the button will be at the bottom of the screen:

The next step is to select the type of device you want to emulate. The AVD Manager allows you to create emulators for TVs, phones, tablets, and Android wear devices.

Make sure the Phone is selected in the Category section on the left-hand side of the screen. Go through the list of devices in the middle of the screen and choose one. Then, click Next:

On the System Image screen, select the version of Android you want your device to run on, and click Next:

If the SDK version you want to emulate is not downloaded, click on the Download link next to it in order to download it.

On the Verify Configuration screen, go through and confirm the virtual device settings by clicking the Finish button:

You will be sent back to the Your Virtual Devices screen, with your new emulator showing the following:

You can click on the play icon under the Actions tab to start the emulator, or the pencil icon to edit its configurations.

Let's go ahead and start the emulator we just created by clicking on the play icon:

As you may have noticed, the virtual device comes with a toolbar on the right-hand side. That toolbar is known as the emulator toolbar. It gives you the ability to emulate functionalities such as shutdown, screen rotation, volume increase and decrease, and zoom controls.

Clicking on the More(...) icon at the bottom of the toolbar also gives you access to extra controls to simulate functionalities such as fingerprint, device location, message sending, phone calls, and battery power:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset