Question

I’m looking for some information regarding how I would create a demo period in my Android application. Essentially, I would like a user to be able to use my app for say 5 days. What sort of methods are available to be able to determine how long the user has had the application?

The only solution I can think of is to try saving something to shared preferences based on a date/time stamp from when the user started the app for the first time. Then each time they start the app, I grab this data from Shared Prefs and either enable/disable functionality accordingly. I’m not sure how exactly to get a time stamp into shared prefs though.

Unfortunately, there doesn’t seem to be much on Google…or I’m just using the wrong keywords.

Help! Thanks!

Was it helpful?

Solution 2

I implemented this using shared preferences. Obviously, as Scoobler suggested, the user can get around this. But as I also stated, this is the type of user that I would never get $0.99 from anyway.

As I've learned over the past few months, I believe that my approach to this was wrong. Demo apps that expire just aren't a real common thing in the marketplace. Instead developers create Ad supported and Lite versions of their applications. From what I'm seeing these tend to be more successful than demo period apps.

Well live and learn...or is that code and learn... :)

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top