When developing a small Xamarin forms app I wanted the android emulator to connect to an intranet identity provider. That didn’t work. The id server was using an SSL certificate issued by an untrusted CA. Here’s what I did to get it working.

Xamarin

Xamarin Android Player

If you already have Visual Studio 2019, you can check for updates: Open Visual Studio for Mac. In the menu bar, select Visual Studio Check for Updates. Available updates will be displayed and select Update. Optional: Install Xcode. If you want to build Xamarin apps for iOS or macOS, you'll also need.

  • Hi @Krumelur, I do not seem to be able to get an IP for an Android Studio based emulator (or started via emulator -avd command in terminal), Android Player from xamarin provides this as I think Genymotion does.
  • Feb 23, 2016 Xamarin Android Player has deep integration with Visual Studio and Xamarin Studio and a native user interface on both Mac & Windows. Running Android on an x86 virtual machine using hardware.
  • Dec 13, 2020 android xamarin xamarin.forms xamarin.android. Improve this question. Have followed all the steps in the document about emulator in Visual-Studio for mac?

First, you will need the CA certificate so android can trust the SSL cert. If you don’t have the cert, you can export it using Chrome on mac or Chrome on windows:

Exporting certificate using chrome

Next, push the .cer to the emulator using adb push command. Note that even though I’m pushing the cert to the sdcard it actually shows in a different location. I’m not sure why my emulator is doing that but I’ve seen others that work just fine. Just make sure to search in all folders when installing the cert in the emulator.

Before installing the certificate, you will need to enable device lockscreen security. Finally, install the certificate using Settings app:

Xamarin Android Emulator Download Mac

Importing certificate to Android Emulator

Xamarin Android Emulator Mac

After import, you can check your certs in User credentials under Encryption & credentials and more importantly, navigate to the SSL site without errors.

Xamarin android playerVisual studio android 11

Cheers!