2

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!

user432209
  • 20,007
  • 10
  • 56
  • 75
  • 1
    If you were to use shared preferences - the user could clear saved data (managing applications) and the preference would dissapear, allowing the user to use your app for another 5 days. Not the end of the world, because if you are storing data into a DB the user would also loose that, but worth beaing in mind. – Scoobler Nov 02 '10 at 12:21
  • My thought is that if a user is so inclined to do this constantly, I would never actually get $0.99 from them anyway. – user432209 Nov 02 '10 at 12:32

2 Answers2

1

You'll want to look at LVL: http://developer.android.com/guide/publishing/licensing.html

Miguel Morales
  • 1,707
  • 10
  • 10
  • I should have mentioned I considered this. Fundamentally, it has it's own problems though...I have to charge for the original application which I don't want to do. I want users to download a full free version in order to get hooked to my app. I firmly believe that this approach generates more interest in the application over time which very likely turns into increased revenue for the application. – user432209 Nov 02 '10 at 12:36
0

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... :)

user432209
  • 20,007
  • 10
  • 56
  • 75
  • i'm using it too before reading.. I'm using shared preferance(SP) for saving some data, but if user removed app from phone and install again - than SP cleaned, and demo work again :( Someone know a way how to fix this ? Or maybe know other way to save some data.. :( – Peter Dec 19 '11 at 15:41
  • I think you should create server like Google licensing server and then check installed app. So if the user install app at first time, you will be able register it on your server and so on. The problem is you have to create the server. – Nolesh Jul 09 '12 at 22:01