locked
Why does CurrentApp.LicenseInformation.IsTrial always return false in the release version?

    Question

  • I've developed a Store App and integrated code for converting a trial to full license.

    When I check the LicenceInformation.IsTrial property, it always returns false in the release version.

    Here's the method from the License class I created that accesses the License Information:

    private static LicenseInformation _information;
    public static LicenseInformation Information
        {
            get
            {
                return _information ?? (_information = Helpers.IsDebugMode
                   ? CurrentAppSimulator.LicenseInformation
                   : CurrentApp.LicenseInformation);
            }
        }

    I've submitted the app to the Store but nobody can purchase it because the it appears to be already purchased when my code checks the Information property.

    Why would this happen?

    Saturday, February 21, 2015 6:30 PM

All replies

  • Yes it is expected - in debiug mode or if your App is not published you will get false.
    As it is said on MSDN:

    Real license information is available for an app only after it has been 
    published to the Store. 
    

    If your App is working fine with license = true/false then after publishing App the code you have preseted should work. The best practise is to put that code in Application_Launching and Activatied events.

    Monday, February 23, 2015 10:42 AM
  • mmm... I already mentioned the app was submitted to the Store and yet the code still doesn't work in the published version.  On testing the release version, the code still returns LicenseInformation.IsTrial as false?  I created another user on my laptop and downloaded the app for that user and it still doesn't work as IsTrial is always false.
    Monday, February 23, 2015 10:57 AM
  • mmm... I already mentioned the app was submitted to the Store and yet the code still doesn't work in the published version.  On testing the release version, the code still returns LicenseInformation.IsTrial as false?  I created another user on my laptop and downloaded the app for that user and it still doesn't work as IsTrial is always false.
    Sunday, May 10, 2015 7:07 PM