Handling Free and Paid app form a common codebase.

Jesse Knott 686 Reputation points
2021-09-08T20:24:18.86+00:00

My app is in the GooglePlay store as a paid app.
I would like to make a free version that is limited in how many records it can save, and so on.

I've created an overloaded class for my database queries, it looks at a flag in the app which specifies which version of the app is running. Right now I just have this set as a const to the paid version so it will always allow all functionality.

What I am considering, is making a new build target that will toggle this to the free flag, then I can upload that to a new app in the play store as a free app with ads.

Within the app, if the flag is set to free, it will show a menu item to buy the full version which will cost the same as the paid version, and will function as an inapp purchase.

Then I can query the purchase history, and see if the paid inapp purchase was made. If it was, the free flag will be set to the paid app, which will then cause ads to disappear, and features to be complete.

From what I can tell, this is the easiest method to accomplish my goal. I prefer the idea of checking the purchase history for the flag over doing something like creating a local file that functions as a license. By checking for the purchase it will support multiple instances of the app on multiple devices, and so on.

Any thoughts? Is there some other manner or method I should look into?

Cheers!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,297 questions
0 comments No comments
{count} votes

Accepted answer
  1. JarvanZhang 23,951 Reputation points
    2021-09-09T06:19:50.997+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    If it was, the free flag will be set to the paid app, which will then cause ads to disappear, and features to be complete.

    Hi, JesseKnott-2239. Does your application only require to pay fees one time? If the service is paid regularly, for example once a year. You also need to check the validity of the payment service.

    By checking for the purchase it will support multiple instances of the app on multiple devices, and so on

    For the data of the free version users, you could just save these data in the local database instead of saving the data to the server.

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful