Tomasz Cielecki: Installing gapps in Visual Studio Android Emulator (Marshmallow)

The images Google provides in the Android SDK are all great and work fine if you have Intel HAXM installed on the machine. However, a lot of developers using Visual Studio, also use Hyper-V to run Windows device emulators. This means Intel HAXM doesn’t work and in turn means that the x86 images from Google won’t run because there is another hypervisor running.

Microsoft have been so kind to provide the Visual Studio Android Emulator which uses Hyper-V as hypervisor and does not require you to reboot your machine every time you want to switch between using Hyper-V and another hypervisor. Great!

There is one caveat. None of the images included in the Visual Studio Android Emulator tools have Google Play Services installed. Hence, you have to install them yourself. It turned out to be more complicated than I thought it would. Hence, I am documenting it in this blog post.

At first I tried the tried and great OpenGapps, which a lot of custom roms for Android devices recommend using. Picked x86 and the pico package for Android M and tried to install that on a Marshmallow image. It just threw an error telling me that the system/ folder was missing in the zip. Great, what then? I tried adding that folder with an empty file manually to the zip, as it seems it doesn’t care whether the zip is signed or not when installing. This made the zip install. Well not really, no Play Store or Play Services where actually installed.

I tried some other GAPPS zips from various sources, none of them seemed to work. I searched around without finding any solution.

Alexandre Chohfi over at the Xamarin Community Slack pointed out that he had the same issues with Genymotion, which runs on VirtualBox and pointed me in the direction of this gist explaining how to do it on Genymotion. Following the instructions from arcao in the comments works! Without installing that Genymotion ARM translation package too.

Steps I used

Prerequisites

1. Install a Marshmallow image in the Visual Studio Emulator for Android tools (can be opened through Tools > Visual Studio Emulator for Android in Visual Studio)


2. Download gapps-L-4-21-15.zip

3. Download benzo-gapps-M-20151011-signed-chroma-r3.zip

Installing

1. Start the Marshmallow image

2. Drag the gapps-L-4-21-15.zip onto the Emulator after it has booted. It will prompt you to install the zip and shutdown the device after that.

3. After having install the gapps boot up your Emulator again, it will show a dialog about optimizing newly installed packages.
4. Go to Settings > Accounts and Add a Google Account. Ignore all crashes.

5. After adding the Account, install the benzo-gapps-M-20151011-signed-chroma-r3.zip by dragging it onto your Emulator, like in step 2.
6. After rebooting after step 5. is done, you should now have working Play Services and Play Store on your Visual Studio Emulator for Android.

Xamarin: //build 2016 Tech Adventure Pack Contest Winners

Last week we invited the Xamarin community to post pictures of yourselves with any Xamarin logo at //build 2016 and the hashtags #Build2016 and #Xamarin in the tweet text. We received MANY fantastic entries and chose five winners at random to receive a Tech Adventure Pack, including a DJI Phantom 4 drone and a Sphero […]

The post //build 2016 Tech Adventure Pack Contest Winners appeared first on Xamarin Blog.

Craig Dunn: Introducing Xamarin Workbooks

The first public demonstration of Xamarin’s new Workbooks idea was Miguel de Icaza’s //build 2016 talk “Mobile First” (although he first wrote about it back in February). In his talk, Miguel demonstrates a new take on interactive documentation in which a Markdown-formatted file can live-execute C# code-fenced blocks; not just in-line but also in an iOS or Android simulator.

This opens up a great opportunity to write and share interactive documentation that not only describes an API or feature, but shows it in action. Further, it’s easy to write, being based on the well-known Markdown format.

Give it a try!

You can now try Workbooks for yourself! The editor can be downloaded here, and there is some Workbook documentation on the Xamarin developer portal.

I’ve thrown together a few very simple ideas on github:

  • C# 6 – an interactive workbook version of Xamarin’s C# 6 Overview.
  • Mastermind – an attempt to build a simple game.
  • Magic Eight Ball – since I’ve built that for a number of different platforms previously:
See Miguel’s talk (if you didn’t already) for a really cool demo.

Some Notes

  1. They’re written in Markdown, but with a .workbook file extension.
  2. Each file begins with a small JSON-formatted metadata section. The editor will add this for you.
  3. C# code inside triple-backtick code fences will be executed when the file is viewed in the Workbooks editor. 

There’s sure to be other resources popping up now that the project preview is publicly available — Ben Bishop’s video is the first community resource I’ve seen. Can’t wait to see what everyone creates with it!

Xamarin: Contest: Get Answering on Stack Overflow

Now that every developer has access to Xamarin to develop iOS and Android applications in C# and Visual Studio, we want to make sure our community is on the right foot to scale with the growing interest and demand in mobile .NET development. As Director of Customer Support at Xamarin, it’s my pleasure to announce to […]

The post Contest: Get Answering on Stack Overflow appeared first on Xamarin Blog.

Xamarin: Xamarin Events in April

With all of the new, exciting announcements between Xamarin and Microsoft these past few weeks, there is no better time to sync up with your local community and recap on all of the latest in mobile development! Find an awesome user group, conference, hackathon, or other mobile event happening this month all over the world. […]

The post Xamarin Events in April appeared first on Xamarin Blog.

Adam J Wolf: Weekly Xamarin Newsletter Issue #86

Xamarin for Everyone Nat Friedman announces Xamarin Studio now includes Xamarin. Early Preview of Exrin Adam Pedley releases an MVVM framework for Xamarin.Forms. Simplify Sharing with Plugins for Xamarin Pierce Boggan introduces the Share Plugin for Xamarin and Windows. Testing Xamarin.Forms apps with RockMvvmForms and NUnit Ramon Esteban shows you how to test with the […]

The post Weekly Xamarin Newsletter Issue #86 appeared first on Syntax is my UI.