Monday, October 4, 2010

Releasing Android applications without going through the Market

It is assumed that the development framework and platform used is Eclipse, with the official Android platform plugins. It is also assumed that your are using Linux, because it's what I'm doing.
  1. Update the software version in your logging mechanism;
  2. update the software version in the AndroidManifest.xml file, it has to be coherent with the version of the previous step;
  3. give a Project->Clean just for the sake of being sure that all is fine;
  4. remember to update the “linking” of C/C++ libraries in the Java/Android platform (give a “refresh” with “F5” in the jni/lib directory, copy and paste jni/lib also into the root path of the project);
  5. export the package using Eclipse (with the official Android plugin) using this package name convention: YOUR_PROJECT_NAME_unaligned.apk.
  • The Eclipse exporter will require for a key to be created, with security passwords: it's an operation related to certificates which is very important if the software is to be released to the official Android market;
  1. align the software:
  • zipalign -v 4 YOUR_PROJECT_NAME_unaligned.apk YOUR_PROJECT_NAME.apk
    It's an operation required by Android applications just before you can use them into the Android mobile phones.

Installation procedures

Installing the application into the Android mobile phones WITHOUT passing through the Market is an easy task.

Cleanup previous releases of the software

For the sake of perfection it's better that you cleanup every kind of previous data/files you could have left related to your application: previous releases, directories created, personal configurations, etc.
Two ways to do that:
  1. using a file manager/explorer which you will find easily on the Android Market and delete the files directly from the mobile phone;
  2. mounting the file system of your mobile phone onto the Linux development machine and give a
  • rm -r DIRECTORY_TO_BE_REMOVED

Upload the application package

You have just to upload YOUR_PROJECT_NAME.apk file into a directory in the mobile phone.
You can do that using two different methods:
  1. using the DDMS perspective in the Eclipse framework (“Push a file onto the device”);
  2. mounting the file system of your mobile phone as usb key and copy the project file using your Linux shell.

Install your application

Once you've got you file into the file system of the mobile phone, you can use whatever Application Installer or File Explorer you will find in the Android Market, locate your file and installing it.

0 comments: