App won't suspend correctly / Cert Kit failure


  • Hi,

    my App is finished that far, but I can't get it to suspend correctly.

    The taskmanager and the Cert Kit are telling me, that my App is not getting suspended.

    I have no clue what I'm doing wrong, since as far as I understood it, I just have to set the EventListener und the function called this way has to exit fast enough.

    I tried setting the EventListener in different ways:

    app.addEventListener("suspending", onsuspend, false);

    app.addEventListener("checkpoint", onsuspend, false);

    app.oncheckpoint = function (args) {}

    I have left the onsuspend Function either completely empty or just wrote this in it

    var stateObject = new Object();

    app.sessionState.stateObject = stateObject;

    without additional code.

    It's just a simple Game that I draw directly on the Canvas, I don't use any other recources likes Pictures or stuff that I might need to release...

    Thursday, September 20, 2012 2:56 PM


All replies

  • Allright, so now the Windows App Certification Kit validates my App without any form of susped/resume handling, like I had it set up on the first try...

    So I still have no Idea what went wrong before.
    Friday, September 21, 2012 7:48 PM
  • Hi

    SDK sample provide two way to handle lifecycle

    Please refer to this two sdk sample.



    This sample shows you how to use the WinJS activated and checkpoint events to handle app activation and suspension in your Windows Store app using JavaScript.

        WinJS.Application.addEventListener("activated", activated, false);
        WinJS.Application.addEventListener("checkpoint", checkpoint, false);

    The WinJS.Application.oncheckpoint event fires whenever your app is being suspended by the system. WinJS.Application.oncheckpoint gives your app the opportunity to save the user’s current session so that it can be restored in the case that your app is terminated.



    This sample shows you how to use the Windows.UI.WebUI.WebUIApplication Activated, Suspending and Resuming events in your Windows Store app.

    • Marked as answer by Dino He Thursday, October 11, 2012 8:06 AM
    Sunday, September 23, 2012 8:43 AM