Setting up Emulator

Setting up Android Emulator in Visual Studio

In the last unit, I demonstrated how to create a basic BMI Calculator User Interface using XAML in Visual Studio (link). I feel it’s right for you to know how to setup the Android Emulator by creating a test device for your apps via Visual Studio.

Follow the steps below to know how to setup the Android Emulator:

  1. Open your project and from the Visual Studio User Interface menu, Click the Android Device Manager
Fig 1: Android Device Manager

2. Click the Yes button from the User Account Control Dialog (Windows Machine only. Mac Users may have a similar dialog)

3. Click the New button (with the Plus icon)

Fig 2: The New button from Android Device Manager Dialog

Notice that all your created test device would be displayed here. Currently, Fig 2 has one test device which was previously created and can be activated by clicking the start button to boot the simulator. Observe other properties associated with the test device like the name, OS (Operating System), Processor, Memory, and Resolution.

4. The new device dialog displays all the attributes that are associated with a particular target device. On the left-hand side, change the name (labeled 1) to the name of your choice

Fig 3: New Device Dialog

Let me go through those labelled:

Name: This is the name of the Test Device

Base Device: This is the name of the actual device you are targeting to test your app.

Fig 4: Available Base Device

Processor: This is the processor type for the base device.

OS (Operating System): This is the Operating system the chosen device is running on. The default is Android Pie with API 28. At the time of writing this post, the latest is currently Android 11 (Red Velvet Cake).

Fig 5: Android Operating System Versions

You can change the ram size for the emulator. It’s 1GB by default. Any increase in the ram size would significantly provide faster loading times for your apps and a better user experience but this can take a lot of system resources.

For a full description of the different properties of the emulator and their descriptions, please visit the Xamarin Android Emulator Setup from Microsoft docs

5. When you are done setting up the properties, click the Create button. If the Google API’s for the chosen device and the operating system is not available in your computer, you would be taken to the package’s licesnse agreement for the download to begin before testing your app.

Fig 6: Package License Agreement

Leave a Comment

Your email address will not be published. Required fields are marked *