Android get license for application after trial period

Go To


I need to implement Android application which will be expired after few days or number of uses.
The application will be on the google market.
I can implement the check using shared preferences.
But what should I do in the application if user decides to buy the license?
Is it possible for user to pay via the market?

2012-04-04 19:30
by Costa Mirkin


You can have two different applications. One will be the full version and the other will be the licensed version. The first version will store the first date when the application is run as a SharedPreference. It could also be stored on a server somewhere else. It will then work for only so many days after that. The second version(licensed version) will not work until the user types in the correct product key. This could be validated over the internet.

I'm not sure why you would want to do this though. Most apps on the Android market will have a free version of their application with limited functionality. Then the full version of the application can be purchased separately. This model seems to work well for many applications.

2012-04-04 19:35
by zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz