Phone Deploy App

Have not done anything on this for a long time so it is kind of dead :-(
This app reads an apk file from a url and then ask you to approve the
installation (do not think it can be done automatically).
It also checks periodically if there is a new version to download.
You may be wondering what on earth this is good for!
I use it when I develop apps for IOIO (http://www.sparkfun.com/products/10748).
IOIO is a microcontroller connected to the USB port on an Android phone.
You are unable to connect IOIO with Android emulator, so I created this app to easily upload and test new versions of my IOIO applications on my phone.
In other words, as soon as you put a new version of the apk file (new modification date) on your web server, PhoneDeployApp will triggers an installation of it on your phone.
Android market: https://market.android.com/details?id=org.steelsquid.phonedeployapp
  • Read and install apk from url.
  • Periodically check for new apk.
Here you can download the code: Google Drive

Dependencies (All needed jar is under the lib directory)

Java 1.6
Android Utils
Android SDK (http://developer.android.com/sdk/index.html)

Usage

To open this project in netbeans:
Download and install Android sdk from http://developer.android.com/sdk/index.html
(/opt/android-sdk-linux_x86)
Make all files under tools executable
Extract to disk and execute tools/android (See http://developer.android.com/sdk/installing.html)
Select 'Available Packages' and install Android SDK platform-tools, sdk platform Android 1.6.
Select 'Virtual Devices' and 'New'. Set data below and then create AVD:
Name: Android_1.6
Target: Android 1.6.
SD Card Size: 128MiB
SDCard: yes
AudioOutput: yes
Camera: yes
TouchScreen: yes
GPS: yes
Make all files under platform-tools and platforms/android-4/tools executable
In Netbeans 'Update Center' add this plugin: http://kenai.com/projects/nbandroid/downloads/download/updatecenter/updates.xml
Then install the Android plugin. (See http://gerry.ws/2009/01/1074/how-to-setup-netbeans-for-android-development.html)
Inside Options/Miscellaneous/Android (/opt/android-sdk-linux_x86)

Install on Android:
The Android apk file is located under the dist directory (dist/SteelsquidDeployApp.apk)
See http://www.brighthub.com/mobile/google-android/articles/37151.aspx 

Short description of classes

org.steelsquid.phonedeployapp.R
This class was automatically generated by the aapt tool from the resource data it found. It
should not be modified by hand.
org.steelsquid.phonedeployapp.MainActivity
Man activity.
org.steelsquid.phonedeployapp.Global
Global stuff.
org.steelsquid.phonedeployapp.DeployService
Execute the check for new file in background.
/res/drawable
Contains all icons
/res/layout/main.xml
The main layout.
/res/values/strings.xml
String resources used in the application.
AndroidManifest.xml
The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code.

ToDo

Install and execute app without user input.


Revision history

2011-07-27   1.0   Initial release
2011-08-04   1.1   Missed a finish() in MainActivity
2011-09-16   1.2   New AbstractActivity