Google Inapp Purchase & Trial

I am creating an application that I want to upload to the application store as a paid application. But I would like to publish it as a trial application for a certain amount of time. I looked at all the options in application billing version 3. I found several problems.

  • If I create my application with an inapplicable inapp element, then I will not be able to save it for the specified duration as a trial application (please let me know if my assumption is correct).

  • I create it using a subscription-based model, and then I can do subscriptions forever, and not annually?

+3
android
source share
2 answers

The main problem is that the user uninstalls / reinstalls the application and plays the general settings.

Easy way to use Google SharedPreferencesBackupHelper

Inactive Android SharedPreferences Backup

You just save the installation date as a preference. Even if the application is not installed, if they are installed again, the installation date of orig will be available to you.

+1
source share

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

What do you want to do is allow the user to download the application for free, allow them to use it for 7 days, and then require them to pay for an IAP update (when purchasing the application) or prevent its use?

If the above is true, there is one major problem that you will encounter. To keep track of the date the user started using the application, you will need to use something like general preference, an entry in sql-db or some local file, etc. The only problem with all these parameters is that the user can erase the data and install the application again to use it for free for another 7 days. The only way around this is to implement your own online registration service, which I think will be too complicated.

The best way, assuming that you are not too worried about the people who will get around it, is to fix the date / time when the application first starts and saves it. Each time the application starts checking whether they purchased the update, if they do not check the current date / time for the stored value, and if the trial period expires, suggest that they buy the update or close the application.

0
source share

All Articles