Get Started with Android in Xamarin in 10 Minutes

Visual Studio for Mac

On Windows? Try the Visual Studio 2017 walkthrough.

Install the Xamarin Live Player App

  1. Download the Xamarin Live Player App to your mobile device:
    Google Play Store
    Alternatively, use a QR code reader to scan the following QR code from your device to open the Xamarin Live Player in the Google Play store:
  2. Ensure that your mobile device and Mac are connected to the same Wi-Fi network.

Let's Get Started

In this walkthrough, you'll pair your Android device to Visual Studio for Mac. Once your device is paired to the IDE, you'll learn how to launch an app on your device using the Xamarin Live Player. You'll also learn how to use the Live Run Current View feature to display the current XAML page on your device, and will get a chance to edit the XAML and see it appear instantly.

  1. First, download the XamagonXuzzleLP sample.
  2. While the sample is downloading, enable the Xamarin Live Player in Visual Studio for Mac. To do this go to Visual Studio > Preferences… and select Projects > Xamarin Live Player (Preview). Then select the Enable Xamarin Live Player checkbox:
  3. Locate the downloaded sample and double-click the .sln file to open it in Visual Studio for Mac:
  4. Pair your mobile device and Visual Studio for Mac. To do this both devices must be on the same Wi-Fi network. Once you have ensured both devices are on the same network, select Tools > Manage Live Player Devices… from the menu bar:
  5. Open the Live Player app on your mobile device:
  6. Press the PAIR LIVE PLAYER button in the Live Player app:

    The app will open a camera viewfinder for you to scan the QR code displayed in the Manage Live Player Devices dialog.
  7. Scan the QR code, or enter the code in Visual Studio for Mac to complete the pairing process:
  8. Once your device has been successfully connected, you are ready to deploy the app. Set the device configuration to XamagonXuzzle.Android | Debug and select your device under Live Player from the configuration list. Press the triangular run button to run your app:
  9. Play with the app on your device, try and put the Xamagon back together!

Live Run Current View

Now that you have launched an app to your device with the Xamarin Live Player, the next steps is to start changing code and see those changes appear instantaneously.

This section introduces the Live Run functionality, which allows you to edit the user interface and see it appear on your device.

  1. Before you begin, make sure that your device is still paired to Visual Studio for Mac. To do this, open the device list. If your device name has (unreachable) next to it, try the pairing process again:
  2. Set the device configuration to XamagonXuzzle.Android | Debug and select your device under Live Player from the configuration list.
  3. From the XamagonXuzzle Project, double-click MainPage.xaml to open it in the code editor:
  4. To run this XAML page as a live view on your device, select Run > Live Run Current View from the menu bar:
  5. You can now start editing the XAML and see it appearing instantaneously on your device. For example try the following example to change the background color, or try your own! Find this line of code and change the BackgroundColor to your favorite color:
    <AbsoluteLayout x:Name="absoluteLayout"
                    BackgroundColor="Black" />
  6. When you are happy with your XAML layout, run the app to see the user interface updates in the context of the entire app.

Next Steps

This walkthrough is designed to show you how to use Visual Studio for Mac and the Xamarin Live Player to launch an app on your device. It also shows how you can use Xamarin Live Player to launch single XAML pages of your app, allowing you to rapidly prototype your user interface.

The next page shows some additional samples that can be used with your Android device and the Xamarin Live Player.

Additional Samples >


If you have issues with the Xamarin Live Player, check out the Troubleshooting guide for additional help.

Get Started with Android in Xamarin in 10 Minutes

Visual Studio 2017

On Mac? Try the Visual Studio for Mac walkthrough.

Install the Xamarin Live Player App

  1. Download the Xamarin Live Player App to your mobile device:
    Google Play Store
    Alternatively, use a QR code reader to scan the following QR code from your device to open the Xamarin Live Player in the Google Play store:
  2. Ensure that your mobile device and Windows machine are connected to the same Wi-Fi network.

Let's Get Started

In this walkthrough, you'll pair your Android device to Visual Studio 2017. Once your device is paired to the IDE, you'll learn how to launch an app on your device using the Xamarin Live Player. You'll also learn how to use the Live Run Current View feature to display the current XAML page on your device, and will get a chance to edit the XAML and see it appear instantly.

  1. First, download and unzip the XamagonXuzzleLP sample.
  2. While the sample is downloading, enable the Xamarin Live Player in Visual Studio 2017. To do this go to Tools> Options > Xamarin > Other. Then select the Enable Xamarin Live Player checkbox:
  3. Open the sample project in Visual Studio by selecting File > Open > Project/Solution…. Locate the downloaded sample and press the Open:
  4. Pair your mobile device and Visual Studio. To do this both devices must be on the same Wi-Fi network. Once you have ensured both devices are on the same network, select Tools > Xamarin Live Player > Manage Devices… from the menu bar:
  5. Open the Live Player app from your mobile device:
  6. Press the PAIR LIVE PLAYER button in the Live Player app:

    The app will open a camera viewfinder for you to scan the QR code displayed in the Manage Live Player Devices dialog.
  7. Scan the QR code, or enter the code in Visual Studio, to complete the pairing process.
  8. Once your device has been successfully connected, you are ready to deploy the app! Set the device configuration to XamagonXuzzle.Android | Debug and select your device under Live Player from the configuration list. Click the device name or press F5 to start debugging your app:
  9. Play with the app on your device, try and put the Xamagon back together!

Live Run Current View

Now that you have launched an app to your device with the Xamarin Live Player, the next steps is to start changing code and see those changes appear instantaneously.

This section introduces the Live Run functionality, which allows you to edit the user interface and see it appear on your device.

  1. Before you begin, make sure that your device is still paired to Visual Studio. To do this, open the device list. If your device name has (unreachable) next to it, try the pairing process again:
  2. Set the device configuration to XamagonXuzzle.Android | Debug and select your device under Live Player from the configuration list.
  3. From the XamagonXuzzle Project, double-click MainPage.xaml to open it in the code editor:
  4. To run this XAML page as a live view on your device, select Run > Live Run Current View from the menu bar:
  5. You can now start editing the XAML and see it appear on your device. For example, try the following example to change the background color, or try your own! Find this line of code and change the BackgroundColor to your favorite color:
    <AbsoluteLayout x:Name="absoluteLayout"
                    BackgroundColor="Black" />
  6. When you are happy with your XAML layout, run the app to see the user interface updates in the context of the entire app.

Next Steps

This walkthrough is designed to show you how to use Visual Studio 2017 and the Xamarin Live Player to launch an app on your device. It also shows how you can use Xamarin Live Player to launch single XAML pages of your app.

The next page shows some additional samples that can be used with your Android device and the Xamarin Live Player.

Additional Samples >


If you have issues with the Xamarin Live Player, check out the Troubleshooting guide for additional help.