Thursday, April 30, 2015

Creating a trial app with a feature that expires after being used twice

I want to add a feature to my app that user can avail only twice or thrice in the trial mode. I am unable to figure out which purchase mode should I implement.

I successfully implemented the in-app-purchase for making the feature available for lifetime. But how should I go about limiting its usage if the user has not bought it?

According to the sample code I am following I have these options:

Expiring Product: This allows me to expire the feature after certain period of time but I need to expire the product after number of usage.

InAppPurchase: I can purchase feature through this but I cannot limit the feature in trial mode.

ConsumableInAppPurchase: Again it requires the user to buy the feature first and then it can be consumed.

I figured that if I can save an int in local settings of app the first time app is used and then decrement it until its 0, and then prompt the user to buy, it will do the job. But if I use this method user can always delete the settings file and my app wouldn't know that it is not being used the first time. 

Can anybody tell me how I can achieve my requirement?

Thanks


No comments:

Post a Comment