Home » Android » android – How do you release two versions of an app on the Market?

android – How do you release two versions of an app on the Market?

Posted by: admin June 15, 2020 Leave a comment

Questions:

I would like to add two versions of my app to the Android Market, one for a few cents, and one free version, with ads. That’s a very common practice.

I’m currently building AdMod into my app, and it seems I’ll have to change quite a few files, so it seems best to make a separate version of my app for this.

How do you achieve that? A branch? A different repository? Has anyone found a way to keep both apps in the same repository in a reasonable manner?

The title is not misspelled, I do mean “realise”, i.e. how people manage the two versions, not how they add them to the Market.

How to&Answers:

This kind of thing is a complete nightmare – unfortunately the Android build system doesn’t really support it in any good way.

We do it by having 99% of the code of our application in a library project. We then create one application project for each different version of the app, each of which use that library.

Where we need different versions of the app to behave differently, we currently achieve that by having different resources that are queried at runtime. We are in the process of moving to using Dependency Injection via RoboGuice, however.

There are elements of this that work reasonably well, and others that don’t. It’s necessary, for example, to duplicate the AndroidManifest.xml file, which can be error-prone (it’s easy, for example, to add a new activity to one manifest and forget to do so in the others). It’s a mess, unfortunately, but the least-bad solution we’ve found.

Personally speaking, I would strongly advise against using branches to achieve this effect. They can work well initially, but will rapidly become a maintenance nightmare.

One side benefit of using a library is that we’ve found that it makes testing considerably easier. For an example of how to set this up, see:

http://www.paulbutcher.com/2010/09/android-library-project-with-tests-step-by-step/

Answer:

People usually upload them twice(like two different programs) and just modify the title for adding something like Ad-Free, Donate and things like that. And on the free version just add the Free label and also put on the description that it’s Ad-Supported.

Here is an example with the SMS Popup application:

SMS Popup Versions Side-by-Side

For the Android Market, they are considered different programs, but for us it’s the same, but one is Ad-Supported and the other isn’t.