CurrentApp vs. CurrentAppSimulator RRS feed

  • Question

  • Hi!

    Following the MS Sample App I made my own proxy.xml file like this:

    function loadTrialModeProxyFile() {
                function (folder) {
                        function (file) {
                            currentApp.licenseInformation.addEventListener("licensechanged", trialModeRefreshScenario);
                            Windows.ApplicationModel.Store.CurrentAppSimulator.reloadSimulatorAsync(file).done(function () { });

    In simulator mode the licensechanged handler fires after loading the simulator file and reloadLicense is called.

    My question: Does the event also fire in CurrentApp mode - when the app is in the store? And if not, what is the best way to call reload license on navigating to the page?

    Thanks a lot


    Saturday, April 4, 2015 2:12 PM


  • Hi Dragon-21-06-1982,

    >>My question: Does the event also fire in CurrentApp mode - when the app is in the store?

    Yes, when we code and test new in-app product for the first time, we must use the CurrentAppSimulator object instead of the CurrentApp object. This way we can verify our license logic using simulated calls to the license server instead of calling the live server.

    Ref to LicenseInformation.LicenseChanged event: https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.applicationmodel.store.licenseinformation.licensechanged.aspx


    LicenseChanged events aren't always immediate. If you’ve registered for the event, the event should fire within an hour; if not, it should occur within 6 hours. Generally, it's recommended to wait up to 6 hours when testing with CurrentApp, knowing that it will most likely take less time if the app has registered the event.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 6, 2015 5:51 AM