When building and deploying a WP7 application in which you want to license (i.e. charge money) for you can have the ability to offer your users to try your application before they buy it. You can do this by enabling Trial Mode in your application.
Side Note – In my opinion EVERY application that is being deployed and cost money should implement trial mode. I fee this way because if you are asking me to take the risk (yes i know $.99 is not much of a risk) of using your application then let me sample the goods for free. There is nothing I hate more than buying an app and using it one time just to simply find out it sucked.
When building your WP7 application which enables trial mode you must put up some fences around your trial and non-trial features in your application. To do this you can simply perform a simple ‘if’ check to determine if you are in Trial mode or not. To check for trial mode you need to do 2 things:
- Add a reference to Microsoft.Phone.Marketplace
- Create an instance of the LicenseInformation class and call the .IsTrial() method (this is the only public method in the instance).
If the call to .IsTrial() comes back as true then you know that your application is in trial mode and you should handle this correctly.
Things to know about trial mode
- Trial license does not expire, but is replaced by a full license when the customer purchases the application.
- IsTrial() will ALWAYS return true during development so you must simulate IsTrial being true by either using conditional compilation or some configuration setting.
- You are required to prompt the user to purchase the application (in some location at some point in the app). When prompting the user you should open up the Marketplace Launcher to allow the user to buy the product. If the user buys the product you will want to re-query IsTrial again to check for status changes.
Posted
10-18-2010 5:23 AM
by
Derik Whittaker