0

I just finished my Full version on my app. I am now looking around trying to figure out how to make my Lite version of the app. Not a whole lot is different but there are differences especially when you are playing the trivia game. How do I go about managing both of these versions in Eclipse? I looked at this guide:

http://blog.donnfelker.com/2010/08/05/howto-android-full-and-lite-versions/

But it seems like the linked tutorial is outdated based on the comments below the tutorial about adding Proguard to the code. There has to be an easy way to do this. Is the best way still to make 3 projects like the above linked tutorial says but just find away to get around the Proguard issue?

Matt
  • 3,882
  • 14
  • 46
  • 89

1 Answers1

1

Not sure if this counts as an answer but I have positive experiences from using library projects when creating dual version Apps like free/pro, lite/paid or whatever you choose to call them.

You can separate the differences in logic either by using simple if-statements, like if(AppType.isFree(context)) where in the helper method you check if the context package is that of the free or paid version.

Or by using inheritance and interfaces to take advantage of polymorphism and dynamic binding. For example the menu activity in your lib might invoke a getGameActivity, which depending on sub class (free or paid) returns the appropriate version of the game and where most of the logic is in the abstract lib GameActivity class.

And about ProGuard, if you are not very afraid of reverse engineering, it's not really necessary to bother with it.

Nicklas Gnejs Eriksson
  • 3,395
  • 2
  • 21
  • 19
  • Yea I am not very concerned about reverse engineering anyways so I guess I should just not worry about it. So if I do what my original link suggests, do I use the logic you suggested? I guess I am just not sure what goes into the full/lite projects. I just cannot get my head around this yet. – Matt Mar 11 '13 at 17:48
  • There are 4 differences: (1) lite version has ads and pro doesn't (2) lite version will have a link in one of the activities to the pro version (3) one integer that is 30 in the lite and 50 in the pro (4) one integer that says number of high score spots on the high score list which is 15 in lite and 30 in pro. My main library has ads, the link to the paid app, 50 questions and the 30 high score spots. Do I just go into the ````lite package```` and make some logic statements for differences #3 and 4 and then some logic statements in the ````pro package```` for differences #1 and 2? – Matt Mar 11 '13 at 18:43
  • 1
    3 and 4 can easily be put in the lib. If the ads has .jar dependencies, or require extra manifest permissions, then you should move them to the free/lite project and keep the lib clean. You can still of course have ad holder (views) in the lib, but only use them from the free project which will make them hidden in the pro one. The link is also very easy to have in any of the Apps, either have it in free, determine if shown in lib, or hide it in Pro, all has the same effect so. – Nicklas Gnejs Eriksson Mar 11 '13 at 18:55