Game Development Reference
In-Depth Information
Figure 12-6. Creating the final .apk file
Testing the Distribution .apk File
Now let's test the distribution .apk file you just created, by installing it on an Android device.
First, the .apk file has to be copied to the actual Android device. There are many ways to do this,
depending on what version of the Android operating system you are using, what software (such
as FTP) you have installed on your Android, and what network connections you have set up. I will
demonstrate the copying method that will work on all the Android operating systems, regardless of
what file transfer software you have installed or what network connections you have set up. To do
this, we can use the Android Debug Bridge (adb) push command to put the file on the device that is
connected to your computer via USB cable. The general form of the command is as follows:
adb push Filename LocationOnAndroidDevice
The specific command to put the MainActivity.apk file on the Android device at the
location /sdcard/Download using the adb located at C:\Android\adt-bundle-windows-x86\sdk\
platform-tools and assuming we are in the same directory that the .apk is in is
C:\Android\adt-bundle-windows-x86\sdk\platform-tools\adb push MainActivity.apk /sdcard/Download
 
Search WWH ::




Custom Search