rick
rick

Reputation: 4715

Combining both free and paid versions for android

I want to release the app in both free and paid versions. But I have a problem here. As per my knowledge, the app will be updated when the version number is increased in the manifest having the user saved data uncleared. I want the same feature when the user opts from free to paid application i.e., If user downloads the free app and saves his data(I am using sqlite for persistence) and uses it for few days. If the user likes it and go for paid app for more features, I want the user saved data as it is. Just like as he updates the app.

If I just change the version number for free and paid apps, what if I want to update the free one to resolve some bugs when it is gone live. So, can someone suggest achieving this? I am very confused on how to go further. Thanks.

p.s: I have seen some post maintaining the common things as library project, but it doesn't seem it is fit. Because I have to change the package names for those. If I change the package names, the lite cannot be updated as the paid one automatically.

Upvotes: 1

Views: 254

Answers (2)

Vlad
Vlad

Reputation: 18633

Take a look at the android:sharedUserId manifest element.

android:sharedUserId

The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.

If you can get that to work, it means you could for example allow the paid version to "import" data from the free version.

Upvotes: 1

Ricardo
Ricardo

Reputation: 7965

I think your best two solutions are:

  1. In-app billing where the user can buy the paid features of your app

  2. Have another app which works as a key to your main app. So when the user buys the key app, you can have your main app check if key app is installed and unlock the paid features

Some links with more info:

Upvotes: 3

Related Questions