locked
Suspended and resumed metro app RRS feed

  • Question

  • Hi 

    We want to prepare our application for the certification.

    In order to do that we run a windows application certification kit (wack),

    And it seems that we failed on "suspended" section.it seems that in our application we use

    WinJS.Application.Oncheckpoint with the default implementation (app.sessionState.history = nav.history);

    the question is if we need to implement some suspend or resume code beside the default one ?

    thanks

    Tuesday, September 4, 2012 11:05 AM

Answers

  • Hi 

    we found the problem , its seems that the problem related to activation instead of suspended.

    we removed the code from activation and place it within the "DOMContentLoaded"

    solved the issue.

    thanks


    • Edited by TomerBanin Wednesday, September 19, 2012 11:13 AM
    • Proposed as answer by Brian Hilstrom Wednesday, September 19, 2012 1:13 PM
    • Marked as answer by Dino He Monday, September 24, 2012 7:36 AM
    Wednesday, September 19, 2012 11:12 AM

All replies

  • Yes,

    You have to save your current application state to include any information necessary to restore your application if it is terminated by the operating system and resumed again.

    See this sample:

    http://code.msdn.microsoft.com/windowsapps/App-activating-and-ec15b168

    also read all the links at the end of the sample so you understand what process lifetime management is all about!

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, September 4, 2012 7:21 PM
    Moderator
  • Hi

    thanks for your answer.

    I take a look at microsoft sdk samples and try to implement the same for my app 

    But it still failed on WACK !!!(i left Oncheckpoint function empty).

    The thing is that when we suspend the app and then return back to it ,its return to the same screen as before(correct behavior).

    in addition to that we saw that in the task manager the app state is suspended ,its take more and less 10-15 seconds to go there (although we didn't implement any behavior for suspended).

    could you please guide us with more information about this.

    thanks

    Thursday, September 13, 2012 11:50 AM
  • Hi 

    we found the problem , its seems that the problem related to activation instead of suspended.

    we removed the code from activation and place it within the "DOMContentLoaded"

    solved the issue.

    thanks


    • Edited by TomerBanin Wednesday, September 19, 2012 11:13 AM
    • Proposed as answer by Brian Hilstrom Wednesday, September 19, 2012 1:13 PM
    • Marked as answer by Dino He Monday, September 24, 2012 7:36 AM
    Wednesday, September 19, 2012 11:12 AM