How to Install an App on a Physical Android Device
Installing an application on an Android device is no different from installing it on the emulator, except for having to make a few small adjustments to get it to work. If you’re on a Windows machine, install the necessary drivers. The remaining steps are straightforward:
From the Home screen of your phone, access the Settings panel.
Choose About Phone.
Tap on Build number seven times to unlock the developer options. You should see a message that says “You are now a developer!” If only you’d known that being an Android developer was so easy, you wouldn’t have needed to buy this book!
Go back to Settings and choose Developer Options, then select the USB Debugging option, as shown.
This step allows you to debug your application on a device.
Connect your phone to the computer by using a USB cable.
The phone will ask you whether you want to allow USB debugging for this computer. Click the Always allow from this computer check box and click OK.
When the phone is detected on your system, run the application by choosing Run→Run ‘Silent Mode Toggle’.
Your device and any emulators that are currently running will show up in the device chooser (refer to Figure 5-2).
Choose your phone from the list and click OK.
This step sends the application to your phone, and it launches it just as it would on the emulator. In a few seconds, the app should show up on your phone.
You’ve now deployed the application to your phone.
If you change the app and you need to test it again, you have to reinstall it on your phone. It’s a simple matter of plugging in your phone and choosing Run→Run ‘Silent Mode Toggle’.