Close
Topic : Android Virtual Device (AVD): Use Pre-Configured Device: | System Images | Create Custom Device | Clone Device

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.



Using a Pre-Configured Virtual Device:
AVD-Step-1 : infobrother
  • 1 » Vistual Studio Includes pre-configured virtual devices that appear in the Device drop-down menu. Typically we would select the VisualStudio_android-23_x86_phone virtual device to test and debug a Phone app. If one of the pre-configured virtual devices meets our Requirements then we can simply begin to running our app in the emulator.

    2 » If Our Xamarin.Android project is using a Target Framework level is incompatible with the Abailable Virtual Devices, the drop-down menu will list the Unusable Virtual Devices under Unsupported Devices. We Can Click Change Minimum Android Target to change the Project's Minimum Android Version so that it matches the API Level of the Available virtual Devices.



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.


AVD-Step-2 : infobrother
  • Steps to Install System Images.

    » Go to Tools > Android > Android SDK Manager and Scroll to the API Level(s) You want to support. In my case i Choose API Level 23, and Intel x86 Atom Image will be Installed so that Virtual Devices Running Android 6.0 Can Be created.
    » For each API Level, enable the check Mark next to the following system images.
         » Intel x86 Atom System Image.
         » Google APIs Intel x86 Atom System Image.

    » If We are Developing 64-bit Apps, we can install the following system images instead.
         » Intel x86 Atom_64 System Image.
         » Google APIs Intel x86 Atom_64 System Image.

    » If we are developing Apps for Android Wear, We install the Following System images instead.
         » Android Wear Intel x86 Atom System Image.
         » Google APIs Intel x86 Atom System Image.



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.


AVD-Step-3 : infobrother
  • #1 - Steps to Open AVD Manager:

    1 » From top Menu, Open Tools > Android > Android Emulator Manager, Or you can Use Android Emulator Manager icon in the toolbar to open it.
    2 » The Android Virtual Device (AVD) Manager dialog displays the list of existing android Virtual Devices. We can use these preconfigured devices too. just click at the device, and press start button to start it.
    3 » We can Create New Virtual device images with different device characteristics and API Levels. Just Press Create button to create New Device.



AVD-Step-4 : infobrother #2 - Steps to Create Custom Device Definition.

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.


AVD-Step-5 : infobrother
  • Steps to Close Device:

    » Open Tools > Android > Android Emulator Manager and go to Device Definitions tab.
    » Select any Device that you want to clone. and click "Clone" to clone the device.
    » "Clone Device" window will Open, The Name of device has benn changed and the device parameters are Modified to create a New custom Device Definition. You can modify the parameters yourself. and when you done, click "Clone Device" to create the New Device definition, which will appears in the Device Definitions List.



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.

















I Tried my Best to Provide you complete Information regarding this topic in very easy and conceptual way. but still if you have any Problem to understand this topic, or do you have any Questions, Feel Free to Ask Question. i'll do my best to Provide you what you need.

Sardar Omar.
InfoBrother





WRITE FOR INFOBROTHER

Advertising






Advertisement