Android Virtual Device:
Our Application is ready, now its time to determince which virtual device to use for testing and debugging our App. which one is good to use. We can use a Pre-configured virtual device or we can create a custom device definition. in our previous tutorial - Android SDK Emulator - we discuss Android Virtual Device, how to use virtual device, so and so on. in this tutorial, we will discuss how we can modify any pre configured device or how we can create a Custom device definition.
System Images:
As the Android Platform Evolves and New Android Versions are Released, each Android Version is Assigned a Unique Integer Identifier, called the API Level: (Read More)
Before We can Create Virtual Devices for New API level, We Must first Install the Corresponding System images for that API Level. For Each android API Level, there are a set of x86 system images that we will need to download and install for creating virtual devices. Follow the Given Steps to Install the Necessary system Images.
Create Custom Device:
After Installing API Level 23 System Images, we can create x86 based Android Virtual Devices Follow the Given Steps to Create Custom Device.
In Create New Android Virtual Device (AVD) Dialog, Configure the Following Options.
AVD Name: | The Unique Name for Your Device Definition. in My Case, the name is set to "MyNexus". Note that the AVD Name Can't contain spaces. |
Device: | Select the Hardware Profile that you want to Emulator. In my case, i select Nexus 6. |
Target: | Select the Android API Level for the Virtual Device. this setting should be greater that or Equal to the Minimum Android Version of Your App. i select API level 23. |
CPU/ABI: | Select Google APIs Inter Atom (x86) so that Google APIs will be available in our device definition. |
Skin: | Select the Appearance of the Virtual Device. in my case, i select HVGA skin. |
Memory Options: | Typically, the default RAM setting is too high and on windows causes the Warning. so, we recommend setting RAM to 768MB. |
Use Host GPU: | This Option causes the Emulator to use th host Computer's Graphical Processing Unit to Perform graphics Operations. We Recomment that you Enable this Option to further Increase the Performance of the Emulator. |
The Remaining Options can be left at their Default Settings. When You done, click ok to create the New Virtual Device. Now, The New Custom Virtual Device is Alos Added to the Device pull-Down Menu.
Cloning a Device Definition:
We can Select an Existing Device and close it to create a New Custom Device Definition. This is Good Strategy to use when there is an Existing device definition that needs only a few Minor Adjustments to Meet our Needs. follow the given steps to close any device.
It is Possible to create a New Android Virtual device by just selecting the User-created device Definition and clicking Create AVD button. this displays the "Create New Android Virtual Device (AVD) dialog". Note that, the pre-configured devices in the list can't be modified. Only user-Created virtual devices can be modified.