Close
Topic : Visual Studio Android Emulator: Start Emulator | Install Device Profile | Configure VS Android Emulator: |
Hyper-V Configuration

Visual Studio Android Emulator:

Hyper-V Formerly known as windows server virtualization. It lets Us create a virtualized server computing environment where we can create and manage virtual machines. we can run multiple operating systems on one physical computer and isolate the operating systems from each other. With this technology, we can improve the efficiency of our computing resources and free up our hardware resources.

Microsoft Visual Studio Provide an Android Emulator that can be used as a target for Debugging a Xamarin.Android App. This Emulator Uses the Hyper-V Capabilities of our Development Computer, resulting in faster launch and execution times than the default emulator that comes with the Android SDK. The Visual Studio Emulator for Android can be used as an Alternative to the Default Android SDK Emulator when Developing a Xamarin.Android Application.

  • Requirements to Use Visual Studio Android Emulator:

    » Hyper-V Support:
    » 6GB or More of RAM.
    » 64-bit Version of the Pro Edition of Window 8, Window 8.1 or Window 10.
    » A Processor That Supports SSSE3 or Later.



Start Emulator:

Visual Studio Makes Several pre-Configured target-device profiles available in the Debug Target drop-down Manu as show in the following picture.


VS-Android-Emulator-step1 : infobrother

When Visual Studio Starts a Xamarin.Android Application, the Emulator is Launched with the Chosen Device Target and the app is Deployed to the Emulator. A Message will appear in the Bottom left corner of Visual Studio indicating that the Emulator is Starting. It will take some time to Launch the Emulator. When the emulator Screen Appears, Drag the Lock icon on the screen upward to unlock the Device. The Vertical Toolbar to the right of the emulator provides access to emulator features.


VS-Android-Emulator-step2 : infobrother





The following Table Summarizes the function of each button on the vertical toolbar.


ButtonFunctions
Close the Emulator:Shuts down the Emulator Application.
Minimize:Minimizes the Emulator Screen and Keep it running.
Power:Simulates Turning the Device on and off.
Single Point Mouse Input:Returns the device to single point input (after using Multi-touch input).
Multi-touch Input:Overlays several dots on the device display that act as touch points for pinching and zooming. Dragging one dot causes the other dot to move in the opposite direction, simulating two-finger movement.
Rotate Left:Rotate Left side, The Emulator will switch to Landscape mode. Its Helps us to test how the app responds to orientation changes.
Rotate Right:Rotate Right side, The Emulator will switch to Portrait mode again from Landscape mode.
Fit to Screen:Zoom the size of emulator screen, so that it fits on the desktop screen.
Zoom:Scales the Emulator Screen by 33%, 50%, 66%, 100%, or by some custom percentage.
Additional Tools:The Additional Tools Button Will Display a Dialog Opens that Displays the Extra features of the Emulator.
Each Additional feature is available from a row of tabs at the top of the dialog.
ButtonFunctions
Accelerometer:Simulates device movement in a 3D space.
Location:Presents a Map that can be used to select and Simulate a GPS Location. On this map, "map points" can be created for simulating movement between locations.
Battery:Provides a Slider to simulate the amount of charge left in the battery.
Screenshot:In this tab, The Capture Button that takes a screenshot and Displays an Instant preview. The Save button will save the screenshot.
Camera:Simulates taking a picture via a fixed animated image, a picture from a file, or from an attached webcam on your host computer. It is possible to select either the front or rear cameras.
SD Card:The emulator can make a folder on your host computer available to the device as an SD card. When the app reads and writes files to the simulated SD card, they can be accessed directly from the desktop without using the adb command.
Network:Displays a summary of the emulator's network settings (the emulator reuses the network connection of the host computer).


Get More Device Profile:

The Microsoft Android Emulator Includes a Set of Device Profiles that represents the Most Popular Android Versions, screen sizes and Hardware Properties of Android Devices on the Market. In Addition, These Device profiles are Already Configured for various Android Versions such as KitKat, Lollipop, and Marshmallow.

To Install These devices we Use Visual Studio Emulator Manager. We use same manager to start these Device Profiles. follow the given steps to Configuring Device Profiles using Emulator Manager .


VS-Android-Emulator-step3 : infobrother
  • Steps to Configure New Profile Device:

    1 » From Tool Menu, Click at Visual Studio Emulator for Android.
    2 » Device Profile Dialog Will Open. The Installed Profiles are Highlighted at the top of the list. At the front of each Profile device, there are three button.
      ∇  » Launch the Emulator:
      ∇  » Uninstall this Profile:
      ∇  » Show Details:

    We can install New Profile Device too. TO Install a New profile, click that Downward pointer Arrow button as shown in the picture.



Visual Studio Emulator for Android Not Found?

If you didn't found Visual Studio Emulator for Android in your visual studio, then probably you didn't installed the Emulator yet. to install it, follow the given steps.


VS-Android-Emulator-step4 : infobrother
  • Steps to Open Visual Studio Installer:

    1 » Press Window Key and search for Apps & Features and click it to open.
    2 » In Apps & Features Tab, scroll down and find Visual studio. Click it and select Modify.



VS-Android-Emulator-step5 : infobrother
  • Steps to Install Visual Studio Emulator for Android:

    1 » After Clicking at Modify Button Visual studio Installer window will appears. Click at Modify Button again.
    2 » In Modifying Window, Open Individual Components tab. scroll down and in Emulators Section, check Visual studio Emulator for Android.
    3 » Click Modify button. and the installation will begin.



Emulator Not Working?

In Some Cases, the Emulator will not start if there are incompabilities between the Host processor and the Hyper-V Virtual Machine. To Work around this Issue, We need to configure Hyper-V to Limit the Processor features that that a virtual machine can have. to Configure Hyper-v, use the following steps.


VS-Android-Emulator-step6 : infobrother
  • Steps to Configure Hyper-V Machine.

    1 » Click Window key, and search for Hyper-v Manager and click to open it.
    2 » From Hyper-v Manager Virtual Machine Pane, Right click the Emulator that to edit to use and click settings.
    3 » In settings window, Locate the Compatibility section , Under Hardware > Processor.
    4 » Enable Migrate to a Physical computer with a different processor version.
    1 » Click ok button to change the settings.



Didn't Found Hyper-V Manager?

Make sure you Enable Hyper-V to Create Virtual Machine. Hyper-V can be enabled in Many ways including using the control Panel, PowerShell or using the Deployment imaging servicing and management tool.


Hyper-V is build into Windows as an Optional feature. There is No Hyper-V download or Installable.



  • Requirements

    » Window 10 Enterprise, Professional.
    » 64-bit Processor with second Level Address Translation (SLAT).
    » CPU Support for VM Monitor Mode Extension.
    » Minimum of 4 GB Memory.



VS-Android-Emulator-step7 : infobrother
  • Steps to Enable Hyper-V.

    1 » Press Window Key and search for Turn Windows features on or off. Click it to open.
    2 » In Window Features window, Select Hyper-V.
    3 » Click ok. and restart your computer.



The above tips cover the most common problems when using the Visual Studio Android Emulator with Xamarin.Android. For a more complete guide to Visual Studio Android Emulator troubleshooting, see

















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