Visual Studio Emulator for Android in VS2015 RC

Since our initial launch of the Visual Studio Emulator for Android, we’ve worked quickly to deliver on top feature requests, adding in support for hot-ticket items such as OpenGL ES 2.0, Lollipop, multi-touch, and advanced camera simulation. Today we’re announcing two more features to help you debug and test your Android apps on our fast, Hyper-V compatible, x86 emulator: Device Profiles and WiFi simulation.

Device Profiles

It’s no secret that testing your Android app for compatibility across the staggering variety of Android hardware can be a challenge. Android phones and tablets in the market span a wide range of versions and screen sizes and come in many different hardware configurations (RAM, CPUs, architecture, etc). Making sure that your app works as expected for the most popular devices on the market can mean developer desks cluttered with devices and USB cables and require a significant financial investment. Now, the Visual Studio Emulator for Android is making testing across the gamut of Android devices a cinch by introducing Device Profiles. We’ve curated a set of device profiles that represent the most popular hardware in the market, including devices from Samsung, Motorola, Sony, LG, and more. When you install Visual Studio 2015 RC, you’ll find a new option in Visual Studio under the tools menu—a link to the “Visual Studio Emulator for Android…”

Clicking this menu item will bring up the Emulator Manager, with which you can install, uninstall, and start device profiles. By default, we’ve gone ahead and pre-installed the four device profiles that came with previous versions of the emulator (KitKat and Lollipop phone and tablet configurations), as indicated by the white text and icons. Other profiles in the list will appear grayed out until you click the “Install Profile” button and the installation completes. You can filter the list by API Level (currently 19 and 21, but more to come soon) and click the details arrow on the bottom right-hand side of a profile to view its full configuration details.

Once you’ve installed the set of profiles that you’d like to target, you can start these new profiles directly from the manager by pressing the green “Play” button. Starting a device profile will connect it to ADB, so it will appear to any Android development tool that uses ADB. For Visual Studio, you can easily connect to the profile from C++, Xamarin, and Cordova projects as described next.

In VC++ Cross-Platform and Xamarin Android projects, any running device profiles will be added to the debug target dropdown alongside the four default profiles (you may need to close and reopen your solution after the profile has been started for this to take effect). Here’s how a new device profile will appear in VC++ projects:

And here’s how a new device profile will appear in Xamarin projects:

In Cordova projects, once the device profile is running you can use the “Device” option to target profiles that don’t appear in the dropdown (provided that no other emulators or devices are attached to ADB).

We’re just getting started on expanding our list of device profiles and would love to hear what you need most. If you have a profile or configuration option that we haven’t included yet, please visit our UserVoice page and submit a suggestion.

WiFi Simulation

When we announced the VS Emulator for Android, we asked you to take a survey to tell us a bit about your Android development environment. What we found was that the most commonly-used device feature in your Android apps (apart from single touch, of course) is WiFi. In previous releases of the VS Emulator for Android, we simulated a network connection over Ethernet. We now simulate a connection to a WiFi network, which is a far more common app scenario.

Try it out!

This update is live today and can be installed with Visual Studio 2015 RC by checking the “Microsoft Visual Studio Emulator for Android” option is underneath the “Common Tools and Software Development Kits” sub-node of the “Cross Platform Mobile Development” option in VS setup. Note that if you have installed previous versions of the VS Emulator for Android alongside Preview or CTP6 you may have to uninstall these through Add/Remove Programs in Windows. As always, we welcome your feedback to help us prioritize what’s to come in future releases, so drop us a line in the comments, use the Send-a-Smile tool in Visual Studio, and ask us for help on StackOverflow!