locked
CurentAppSimulator did not change isTrial into false and isActive into true ? RRS feed

  • Question

  • // it works, but it did not change the xml document ?
    // <IsActive>true</IsActive> and <IsTrial>true</IsTrial>
    // are both still true, why ? it should have been isTrial = false, and isActive = true
    var currentAppSimulator = Windows.ApplicationModel.Store.CurrentAppSimulator;
    
                    currentAppSimulator.licenseInformation.onlicensechanged = function (e) {
                        var e = e;
                    };
    
    
     currentAppSimulator.requestAppPurchaseAsync(false).then(function (data) {
                        var app_receipt_data = data;
                    });
    
    

    it works, but it did not change the xml document ?
    <IsActive>true</IsActive> and <IsTrial>true</IsTrial>
    are both still true, why ? it should have been isTrial = false, and isActive = true

    Is this is an error ?

    Wednesday, August 29, 2012 3:11 AM

Answers

  • This is expected behavior. Please see the CurrentAppSimulator class documentation:
    Note  When using the simulation, the initial licensing state of the app is described in WindowsStoreProxy.xml. CurrentAppSimulator method that alter the license state, for example by buying a license or handling an in-app purchase, only update the license state of the object in memory. The contents of WindowsStoreProxy.xml are not changed. When the app starts again, the license state reverts to what is described in WindowsStoreProxy.xml.
    --Rob
    Wednesday, August 29, 2012 3:42 AM
    Moderator

All replies

  • It seems everything does work, when i debug it, the value IsTrial for the app changed into false, and the value isActive for the product becomes true. But it seems the app did not change the XML file, is it by design ?

    Wednesday, August 29, 2012 3:18 AM
  • This is expected behavior. Please see the CurrentAppSimulator class documentation:
    Note  When using the simulation, the initial licensing state of the app is described in WindowsStoreProxy.xml. CurrentAppSimulator method that alter the license state, for example by buying a license or handling an in-app purchase, only update the license state of the object in memory. The contents of WindowsStoreProxy.xml are not changed. When the app starts again, the license state reverts to what is described in WindowsStoreProxy.xml.
    --Rob
    Wednesday, August 29, 2012 3:42 AM
    Moderator