Creating Trial Applications

Today many mobile software vendors maintain two versions of their application code: one for the trial version and another for purchase. The code base for the trial version typically includes some but not all of the functionality of the full version. It also includes code that urges users to upgrade to the full version of the product. The Windows Phone platform, however, eliminates the need to maintain a separate code base for trial software thanks to the handy IsTrial method. The IsTrial method of the Microsoft.Phone.Marketplace.LicenseInformation class provides the functionality you need to create a trial version. Microsoft.Phone.Marketplace.LicenseInformation is a sealed class that contains the methods you’ll use to test your application. You already learned how to deploy applications to the Windows Phone Marketplace in Chapter 5. In this chapter, you will learn how to add a trial option to the applications you deploy so that potential customers have a chance to try your products before they buy them. The IsTrial method determines whether an application is running under a trial or a full license, allowing you to limit the functionality of your application based on the result that IsTrial returns.