Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to have paid and free version of an Android app [closed]

Tags:

android

I already have a free app in the Android Market, but I want to add a paid-for version with better features. I can't upload the same up with some changed constants to unlock those features as the Market tells me I already have an app with that package name in the market.

What's the cleanest way of doing this?

like image 427
DaBeeeenster Avatar asked Sep 14 '10 18:09

DaBeeeenster


People also ask

How do I end an app on Android?

To Close the Application, you can also take "System. exit(0)" 0 is standard or use any exit code.

Can you download paid Android apps for free?

The option of Paid Apps Gone Free (PAGF) allows you to find and download apps, games, icon packs, wallpapers and more that you would typically have to pay for, but similarly to AppSales it tells you which ones are available for free for a limited time.

Is Android Studio free or paid?

The Android Studio IDE is free to download and use. It has a rich UI development environment with templates to give new developers a launching pad into Android development.


2 Answers

The Android SDK formally addresses the issue of a shared or common codebase with something called a library project.

http://developer.android.com/tools/projects/index.html

Basically, the shared code is defined as a library project, then a paid and a free version are simply two different projects in your eclipse workbench, both referencing aforementioned library project.

At build-time, the library project gets merged with either of your releases, which is what you want.

The Android SDK example source code contains a project called TicTacToe that will help you get started with library projects usage.

Good luck.

Daniel

like image 90
Daniel Szmulewicz Avatar answered Oct 18 '22 07:10

Daniel Szmulewicz


Several approaches exist, but you usually don't see the drawbacks until you try them for yourself. Here are my experiences:

  1. Unlocker app. This is very easy to implement, create a new app that acts as a licence: your original app should check if the unlocker app's signature matches that of your app (if yes the unlocker is available on the device, otherwise no); your unlocker should prompt for downloading your free app if not installed, otherwise start it and remove its launcher icon.

    Pros: easy to implement and there is only one codebase to maintain.
    Cons: it is said that users are sometimes confused by this model, they simply don't understand why they have two launcher icons, or what have they just downloaded. Removing a launcher icon is cumbersome, changes are only visible if the device is rebooted. Also, it seems you will not be able to use Google's licensing API (LVL), because your free app cannot make licensing requests on behalf of your paid unlocker app. Any workaround for this latter leads to bad user experience.

  2. In-app purchase. This is easy to implement if you have IAP in your code anyway, otherwise it will take quite some time to get things right.

    Pros: there is only one codebase to maintain and purchasing flow for the user is quite convenient.
    Cons: users are said to be concerned about whether their purchase is 'persisent', meaning they are confused whether they could still use the pro features if they later installed the app to another device or reinstalled it.

  3. Free and paid versions with shared library project. This should not be a hard thing to code and seems like a logical decision to have a single codebase containing most of your app logic and maintain only the differences.

    Pros: users are less confused with this model, but they are probably concerned about whether their preferences will be lost if they start using the paid version.
    Cons: Java/Eclipse in my experience is not really friendly when it comes to libraries. It will take some time to set up the projects correctly, but it will still be confusing how the whole thing works, what to put in which manifest, what happens with resources, etc. You will face build issues with misconfigured projects, build issues with resources not being found (library project will not 'see' already referenced resources, so you'll have to edit the references one-by-one). Moreover asset files are not supported in this model meaning you will have to do some tricks with symlinking, copying or other magic that will just add to the terrible mess your "single codebase" project has already become. And when your project finally builds you just have to keep fingers crossed for the whole thing to work as expected, be prepared for missing images and hidden errors to look for. And of course you will need to provide your users a convenient way to migrate their preferences into the paid version upon first launch.

  4. Free and paid versions with separate codebases and source control. At first glance this also seems a good idea since a decent source control system could lift weight off your shoulders but...

    Pros: same as 3.
    Cons: you will be maintaning two different codebases and nothing else but a merging/branching hell that is to be expected here. App package names should be different, so you'll probably need to differentiate every single file you have, to keep things clean. And of course you will need to provide your users a convenient way to migrate their preferences into the paid version upon first launch.

  5. Free and paid versions with a script that derives one from the other. It sounds like a dirty hack to accomplish, but you know for sure that it works.

    Pros: same as 3 plus you only maintain a single codebase.
    Cons: creating the scripts takes a little time (make sure you rename folders, replace package, application and project names) and you'll have to be careful to update your scripts from time-to-time if necessary (this won't happen if there aren't too many differences between the free and the paid versions). And of course you will need to provide your users a convenient way to migrate their preferences into the paid version upon first launch.

No solution is perfect, but the above can hopefully point you in the right direction if you are just about to start implementing one of the possibilities.

like image 43
Levente Dobson Avatar answered Oct 18 '22 07:10

Levente Dobson