Reputation: 5308
I want to make certain restrictions on distribution of the Android mobile application(apk).
I am currently not uploading the apk to Android market.
I want to provide the apk to the user with the following restrictions.
i> After the Android mobile application(apk) is installed , the application should work for only 5 days.
ii> The apk file cant be reinstalled on the same mobile device more than once.
Is there any way using code by which , I can make the above restrictions?
Kindly provide your suggestions/hints for implementing the same.
Warm Regards,
CB
Upvotes: 0
Views: 831
Reputation: 1
I think there should be an API which provides you the date when the apk is installed on the device, later we can compare that installation date to the current date and calculate if 5 days have occured or not. this may solve the problem. Sorry but I'm not aware of any such API's to get the installation date, but if the API is found then your problem can be solved. I just suggested a method of doing it. Let me also know if it has worked.
Upvotes: 0
Reputation: 21909
Anything that you store on the device itself will be removed once the app is uninstalled, so you cannot check for a previous installation. You could hide something away on the SD card, you then cannot legislate for the user wiping their SD card, or swapping SD cards.
I would suggest registering a unique ID for the app installation with a simple web service. You can then interrogate this web service periodically to determine whether the 5 day limit has expired. Even if the user uninstalls and reinstalls the app, 5 day restriction will still be applied.
Upvotes: 2