Android SDK comes with emulators capable of running applications we develop. We will need it for our project! The purpose of an emulator is to simulate a device and displays all its activity windowed on your computer. What can we do with it? We can prototype, develop, and test--all this without a hardware device. You can emulate phones, tablets, wearables, and TV devices. You can create your own device definitions, or you can use predefined emulators.
The good thing about emulators is that they are fast. In many situations, it will take less time to run an application on an emulator instance than on a real hardware device.
Working with the emulators is just as easy with a real hardware device. For gestures, you use your mouse, and for input, your keyboard.
Emulators can do anything a real phone does! You can easily send incoming phone calls and text messages! You can specify the location of the device, send fingerprint scans, adjust network speed and status, or even simulate battery properties. Emulators can have a virtual SD card and internal data storage, both of them you can use to send real files to that space.
Android Virtual Device (AVD) configuration is used to define an emulator. Each AVD instance works as a completely independent device! For the purpose of creating and management of AVDs, we use the AVD Manager. An AVD definition holds a hardware profile, system image, storage area, skin, and other important properties.
Let's play with it! To run the AVD Manager, do one of the following:
Select Tools | Android | AVDManager or click on the AVDManager icon in the toolbar:
It displays all AVDs you've already defined. As you can see, we don't have any yet!
What can we do here? We can do the following:
- Create a new AVD
- Edit an existing AVD
- Delete the existing AVD
- Create hardware profiles
- Edit an existing hardware profile
- Delete an existing hardware profile
- Import/export definitions
- Start or stop the AVD
- Clear data and reset the AVD
- Access the AVD .ini and .img files on the filesystem
- View the AVD configuration details
To obtain the AVD instance, you can either create a new AVD from the beginning or duplicate an existing AVD and modify it by need.