Creating Trial Applications for Windows Phone

[Note: This topic contains pre-release information and is subject to change in future releases. Blank topics are included as placeholders. References to "Beta" refer to the current version of Windows Phone Developer Tools and references to "Technical Preview" refer to the current version of Windows Phone OS 7.0 and Windows Phone 7.]


Windows Phone Marketplace allows you to implement a trial mode for your application. Trial mode gives you the option to allow users to try your application before buying it.

You can choose whether to allow trial licenses for the applications that you submit to Windows Phone Marketplace.

For applications that you want to allow trial licenses, you must include code that determines whether the application is running in Trial mode or Full mode. You must also define, and include code that implements, how the application will behave in each mode.

The trial license does not expire, but is replaced by a full license when the customer purchases the application.

An application uses the IsTrial method to determine the kind of license that is in place. This method will return true if the application is running under a trial license and false if the application has been purchased and is running under a full license. However, the current implementation of the IsTrial method always returns true. This should not hinder development; a test version of the IsTrial method is needed during development and testing in any case. Please see the section about testing below.

You can determine the specific behaviors that you want to implement in your application when it is running under a trial license or a full license. You may choose to encourage the user to purchase a full license by restricting the behavior of an application under a trial license, or you may prevent an application from running after a trial period.

Microsoft suggests that an application that operates under a trial license be programmed to present the user with a “buy now” option at appropriate times, as determined by the developer. If the user selects the option, the application would use the Show method of MarketplaceLauncher to transfer control to the application’s Windows Phone Marketplace Details page. If the user clicks the Buy button on that page, Windows Phone Marketplace will present a confirmation page. If the user confirms, the purchase is made and the trial license is replaced with a full license. Control then returns to the application or whatever else is next on the phone’s backstack. When and if the application resumes, it must re-query the IsTrial method to detect the change of license and transition to the appropriate behavior for a full license.

You should test your application to ensure that it operates properly under a trial license, a full license, and under a license change resulting from a user purchase. While developing an application, you should simulate IsTrial behavior and the interaction with Windows Phone Marketplace. You can use conditional compilation to switch between actual and test methods. You can also use the SimulateTrialMode property of the XNA Guide class. For more information, see the MSDN topic SimulateTrialMode property.