8.3.1 running the program to the phone
Needless to say, first you need to have an Android phone. Now Android phone is not a rarity, almost already a hand, if you have no words, hurry to buy it.
To run the program to the phone, we need to connect the phone to the computer via the data cable first. Then go to the settings → developer options screen and check the USB debug option in this screen, 8.9. Note from Android
Beginning with version 4.2, the default is to hide the developer options, you need to go to the phone interface, and then hit the bottom of the column four times, it will show the developer options.
Figure 8.9
Then if you're using a Windows operating system, you'll also need to install the driver for your phone on your PC. Usually with the help of 91 mobile phone assistant or pea pod and other tools can be installed quickly, after installation can see the phone has been connected to the computer, 8.10 shows.
Figure 8.10
Now into Eclipse's DDMS view, you will find that there are currently two devices online, one is the simulator that we have been using, and the other is the phone that just connected, as shown in 8.11.
Figure 8.11
Then, right-clicking the →run as→android application on any project in Eclipse will not run the program directly to the emulator or phone, but will pop up a dialog box for you to choose from, as shown in 8.12.
Figure 8.12
Select the first line of the device and click OK, the program will be run to the phone.
Android: Run the program to the phone