How to make a lite version of an Android game

written

I’ve discovered that no amount of screenshots or marketing speak will ever get someone past the $1.99 price point. So with a bit of research and rework a free version Thumb War is now available here.

For a while I thought the process of making 1 project into 2 was going to break the time bank, but after running into this article on the Android Developer site the pieces fit together quite nicely.

The secret is in one property setting of an Eclipse project which allows a project to be shared by another. The setting is “Is Library”. Once enabled all classes and resources (drawable, layouts, strings, etc) are available to users of the library. The activities can be addressed in the manifest with absolute package names instead of the relative package names.

The best part of the whole thing is I don’t need to create a separate jar build process to make it all work. Now, if you’re the type that likes everything automated, I’m leaving that as an exercise to the reader.

After changing the original project a library, I did the following to get the paid version working again.

  1. create new Android project in Eclipse with the same package name as my library.
  2. edit Android properties and added a reference to the newly converted library project.
  3. copied the Android Manifest from the library project into the paid project.
  4. changed the activity packages in the paid manifest to use the full absolute package names.
  5. removed all drawable in paid project
  6. removed hello world in string.xml and updated app_name
  7. set svn:externals to the library project’s assets directory into the paid projects assets directory, then svn update
  8. run

Surprisingly everything just worked.

The next step was to actually create the free project. This is pretty much the same as the paid project so I started with the paid project as the base.

  1. copy paid project and rename to lite
  2. change package name to com.thethumbwar.lite
  3. run

This also worked. It was functionally the same as the paid project and the original pre-library-itized project and both were on my device at the same time. Which means it meets Androids unique package restrictions, too.

The final step in the free project was to add a few restrictions to it and add a few dialogs to encourage the players to purchase the paid version. That fortunately was the trivial work, phew! In case you’re curious, I’ve restricted 3 of the 5 games and if a user selects a restricted game from the menu a dialog will tell them that it’s unavailable in the lite and provides a button to go to the Android Market to purchase the full version.