My first Android App

This is a step-by-step guide that you can copy to get a working app.

Getting started:

You will need:

  • A computer with internet
  • An android phone.
  • A way to connect it to your computer (USB cable or I hear there is another app you can use to have your phone talk to your computer).

Get Set Up

1.  Download and install the Android Software development kit

It will take a while.  While waiting:

2.  In your phone, find and turn on the ‘debug mode’ setting.  Different versions of android have it in different places.  The latest version of android (4.2+ I believe) requires you to tap 7 times at the bottom of the settings screen!  The point is to get your phone to allow downloads from your usb cable without warnings or needing anything signed.

3.  Connect your phone to your computer.  If you get a warning saying ‘drivers not installed’ then you will need to look up the model number of your phone and find the driver online and install it.  For example, my phone was a Kyocera Rise Model c5155 so I just googled that and it took me to the kyocera-wireless.com/support/drivers page.

The code

4. You can find your own code online somewhere or you can just create an empty file called index.html and put an image it using word or whatever.  If you want to use my code, go http://johnktejik.info/hellophaser/ and do File->Save Web Page and save it as index.html.

5. Zip it up.  This means selecting the files we made/saved and right-clicking them and “add to zip file”.  If you don’t have winzip, go download it.  You can also use winRar (free).

6.  Submit your zip file to PhoneGap (click here for link).  You will need to make an account.  Submit your zip file and wait a bit and it will show you it building.  When the Android build is done (It also will build windows phones, iOS, blackberry versions of your app), click on the .apk button for the app and it will download to your computer.  In my case the file was called crApp-debug.apk.  Now you need to get it on your phone.

Getting it on your phone

7.  Run the Android Debug Bridge.  In your Android SDK you downloaded and installed (You do remember where you installed it, right?), find the platform tools folder.  Somewhere In there is a small executable file called adb.exe and a couple .dll files.  You will probably have to look a bit to find it.  We need to run that adb executable with the command “INSTALL” and the name and full path of your app.

Command line way:

Copy the .exe and .dll files over to where you downloaded the .apk file.  Now in the windows command prompt (Windows->run->’cmd’) navigate to the directory you copied the files.  (or add the directory to your PATH environmental variable)  In my case it was my downloads directory c:/users/J/Downloads.  So I type ‘cd C:/users/J/Downloads‘.    Now type:  “adb install -r crApp-debug.apk” where crApp-debug is the name of your file.  The -r stands for ‘overwrite’.

Windows shortcut way:

Make a shortcut to adb.exe (right-click->send to desktop) and edit the command line properties (right-click->properties->target).  In my case it looked like this:  “E:\Program Files (x86)\Google\ADT\sdk\platform-tools\adb.exe” install -r e:\users\j\downloads\crApp-debug.apk

8.  Done!  After running the ADB.exe it should be on your phone.  Scroll through your icons till you find it.  Click on it.  Whatever files you submitted to the site will now execute.  In my case I have a crappy bird app where I have to tap the screen to guide my block through a bunch of other blocks.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.