Google Inapp purchasing and trial period
Asked Answered
E

2

3

I am building an application which I wish to upload to the app store as a paid app. But i would like to post it as a trial app for a set amount of time. I looked at all the options in the app billing version 3. I have found a few problems.

  1. If I create my app with a non-consumable inapp item then i will not be able to keep it for a set duration as a trial app(Please let me know if my assumption is correct).

  2. I f I create it via a subscription based model then is there a way I can make the subscriptions last forever and not yearly?

Emotive answered 13/6, 2013 at 11:33 Comment(1)
Publish your app as free, and strip functionality after set amount of time. When the user purchases a non-consumable inapp item (either before or after trial expiration), you can enable the functionality.Horde
I
0

I think I know what you're asking, but if I'm wrong let me know.

What you want to do is let the user download the app for free, let them use it for say 7 days, then require them to pay for the upgrade IAP (in app purchase) or prevent them using it?

If the above is correct there is one main problem that you're going to encounter. To track the date the user started using the app you will have to use something like a shared preference, an entry in a sql db or some local file etc... The only problem with all of these options is the user can erase the data and install the app again to use it free for another 7 days. The only way around this is to implement your own web registration service which I imagine would be a little too difficult.

The best way, assuming you're not too bothered about the people who will bypass it, is to capture the date/time when the app first starts and save it. Each time the app starts check if they have purchased the upgrade, if not check the current date/time against the stored value and if your trial period has elapsed, prompt them to buy the upgrade or close the app.

Indiscrimination answered 13/6, 2013 at 13:21 Comment(1)
Of course, you could always just upload the paid version as a free version under a different package name and then remove it from the market. I don't really like this method though as you lose all your download stats and comments etc... You also then have different web links for trial and 'pro' version which is untidy. 1 single app is best, make it the trial app with the pro upgrade option.Indiscrimination
D
0

The main problem here is the user uninstalling / reinstalling the app and losing the shared preferences.

The easy way around this is to use Google's SharedPreferencesBackupHelper

Android SharedPreferences Backup Not Working

You simply save the install date as a preference. Even if the app is un-installed, if they install it again, the orig install date will still be available for you to query.

Deadly answered 22/7, 2013 at 18:39 Comment(3)
This sounds like a very feasible way of doing this, why is it not upvoted?Hamnet
Agree with Bruce. Have anyone tried this? Looks much simpler than having remote server.Carboxylate
This isn't feasible, because the user could remove their backups by disabling google cloud backups in the system settings. Which would renew the trial period.Martyry

© 2022 - 2024 — McMap. All rights reserved.