Derik Whittaker



Enabling your WP7 application to be installed in Trial Mode

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:

  1. Add a reference to Microsoft.Phone.Marketplace
  2. 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
Filed under: ,


Comments wrote Установка пробного режима для вашего приложения WP7
on 10-20-2010 1:54 AM

Thank you for submitting this cool story - Trackback from

Alberto Silva wrote Windows Phone 7: Experiência para programadores (XL)
on 10-20-2010 3:56 PM

Aqui vai mais uma série de linksp para artigos relacionados com o desenvolvimento para WP7 e outras questões

Todd wrote re: Enabling your WP7 application to be installed in Trial Mode
on 10-23-2010 4:43 PM

Be careful when using IsTrial() because this call can take up to 200 ms to return on an actual device, which can be a performance killer.  It's much better store the result of this in a variable and have your code check that variable than call this method repeatedly.  You won't see this performance hit in the emulator, only on an actual device so your application may run fine in trial mode in the emulator and perform horribly on an actual device.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)