Search code examples
c#windows-phone-8trial

WP8 IsTrial() always return false


I've developed WP8 app with trial mode. All code around IsTrial() call was made as described in article http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286402(v=vs.105).aspx

When I debug app with a fake trial (as discribed at link above), my ad banner was shown ok on emulator and developer device, but when my app was became available in WP Store, it looks like IsTrial() always returns false - no ad is displayed!

Does anybody encounter the same problem?

Thanks to all! With regards.


Solution

  • If your App is working fine with license = true/false then after publishing App the code you have presented should work. The best practice is to put that code in Application_Launching and Activated events. Note also that beta version is always free - so you also get false.

    If you test IsTrial, you should also test IsActive. IsTrial returns true even after the trial period ends. IsActive , however, will return false after the trial period ends.