rubenmayayo / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

Support trial period checks as a special purchase type #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, implementing a trial period for an application has to be coded 
completely by the developer, and requires a server component. 

While at it, one has to solve issues caused by application remove / reinstall, 
device reset, user moving to a new phone, app data being cleared.

It should be really easy to implement trial period support as a special item 
type in In-App Billing.

The user would need to make a special free "purchase" to initiate the trial. 
Since Market servers already track managed items, this could be a special 
managed item type. The application would then check for this item being in a 
"purchased" state to enable trial period features.

This would solve the issues caused by reinstalls, device reset, app data being 
cleared, etc., and make trial period support much easier for developers to 
implement.

Original issue reported on code.google.com by kmans...@gmail.com on 11 Apr 2011 at 9:31

GoogleCodeExporter commented 8 years ago
A full-featured time-limited trial is ridiculously complicated, and now that 
IAB3 is caching data in the Google Play app, it makes perfect sense to be able 
to store a trail start date there.  This would make time-limited trials much 
easier to implement.

Original comment by goalst...@gmail.com on 28 Mar 2013 at 8:19

GoogleCodeExporter commented 8 years ago
The easiest and best way to do this is the implement BackupSharedPreferences.

The preferences are preserved, even if the app is uninstalled and reinstalled.

Simply save the install date as a preference and you are good to go.

Here's the theory: 
http://developer.android.com/reference/android/app/backup/SharedPreferencesBacku
pHelper.html

Here's the example: 
http://stackoverflow.com/questions/5161530/android-sharedpreferences-backup-not-
working

:) Pete

Original comment by psto...@gmail.com on 25 Jul 2013 at 7:29

GoogleCodeExporter commented 8 years ago
Thanks, Pete.  Unfortunately, if BackupSharedPreferences is used, the user can 
simply not check (or uncheck) the option "back up my data" to disable any such 
backups of SharedPreferences to Google's servers.  I believe that the user is 
prompted to select whether they want such backups to occur when the device is 
initialized.

Also, I've read that that there is no guarantee that this feature will be 
implemented at all on a particular device, although most devices probably do 
implement it.

I have no illusions about creating an airtight approach to implementing a free 
trial, but it seems unwise to use an approach that the user could defeat 
through non-technical means (e.g., unchecking a checkbox), as the information 
on how to defeat the trial mechanism could then be easily shared among naive 
users.

Thus, devs are presently forced to choose between implementing their own server 
API to hold the trial start date (which requires an Internet permission for the 
app that might otherwise not be needed), or hiding that data on the user's 
persistent storage.

If the Google Play app were to provide a secure archive per app on the device 
for information like a trial start date, it could save developers a lot of time 
in implementing a free trial.  It would be especially good if this data were 
automatically made available on all devices for the same user, just as purchase 
information is.  It sounds like it would be easy to do, since current purchase 
information is already maintained in this manner; it is just a matter of 
opening a small storage area to arbitrary (non-purchase) data generated by, and 
retrieved by, the app itself.

Original comment by goalst...@gmail.com on 26 Jul 2013 at 10:59