Today, I’m going to show you how to test your app on an android phone. I will use Moto G Play but it should work for most android 4.2+ phones.
You will need a USB cable and an android phone to follow this tutorial.
Setup Your phone
First, we will setup the phone. Go to Settings and find About phone as shown below and tap it.
Now tap build number seven times.
Now you should be able to see developer options settings page of your phone.
Now tap developer options and then enable usb debugging. You will see a prompt. Tap ok.
Now connect your phone to your computer via usb cable.
Make sure your phone is unlocked and connected to your computer via usb cable. Windows 10 automatically detected and installed drivers for my Motorolla G play phone but if your phone isn’t detected, you may need to install the drivers.
You can find drivers for your device here.
Now open Android Studio and launch “Hello World” app as we did in our last tutorial.
You will be presented with a screen that looks similar to the screenshot below.
As you can see my phone was detected by Android Studio, now click ok to launch the app on an actual android phone instead of the virtual device like we did last time.
As you can see our app is now running on the phone.
Let me know any comments and concerns via comments below.