In my previous article, we discuss how to create Xamarin Android application with the help of Microsoft Visual Studio 2017. Today we discuss how to run our application on Android mobile. We can do this through USB cable. Here I am explaining with the help of Samsung Galaxy S7 Edge.
Before connecting mobile, we have to enable USB Debugging on the phone. To enable USB debugging, we need to enable Developer Options in the mobile. To enable USB debugging, follow the below steps.
Go to Settings => About Device => Software Info => Press seven times on Build number. It enables developer mode on your android mobile.
Now Go to Settings => Developer Options => enable “USB debugging”
Now connect your Android mobile to your laptop and open your application with Visual Studio 2017. On your mobile, you will get confirmation message comes to allow USB debugging and please select “Always allow USB debugging”.
On your visual studio, it displays your mobile as highlighted below.
Select your mobile, as shown above, run the application. Your application displays with all other applications on the mobile screen as below.
Now open “FirstAndroidApp” app, and it shows your application screen as shown below.