locked
how to go suspend mode RRS feed

  • Question

  • I already know that how to go suspend mode by click lifecycle event on VS.

    

    But i want to know going to suspend mode without clicking lifecycle event on emulation

    i thought that the app's state is suspend mode by switching app. so i tested whether the app go to suspend mode  by switching app, but app's state is not suspend mode because OnSuspending function is not called switching app.

    how the app's state can be suspend mode without clicking lifecycle event on emulation?


    Thursday, October 2, 2014 7:37 AM

Answers

  • If you're in debug mode, it doesn't suspend because it's being debugged.  A deployed (non-debug) app will suspend after 5 seconds.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, October 10, 2014 12:47 PM

All replies

  • I already know that how to go suspend mode by click lifecycle event on VS.

    

    But i want to know going to suspend mode without clicking lifecycle event on emulation

    i thought that the app's state is suspend mode by switching app. so i tested whether the app go to suspend mode  by switching app, but app's state is not suspend mode because OnSuspending function is not called switching app.

    how the app's state can be suspend mode without clicking lifecycle event on emulation?


    Thursday, October 2, 2014 7:38 AM
  • Hi,

    "A note about debugging using Visual Studio:  Visual Studio prevents Windows from suspending an app that is attached to the debugger. This is to allow the user to view the Visual Studio debug UI while the app is running. When you're debugging an app, you can send it a suspend event using Visual Studio. Make sure the Debug Location toolbar is being shown, then click the Suspend icon."

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/e318ebf3-e722-4d5c-b90d-11957a61a24f/how-to-go-suspend-mode?forum=wpdevelop&prof=required

    You should test it when it is not attached to the debugger.

    Launch your application directly from the emulatoror use Visual Studio to send the suspend event.

    Best Regards

    Thursday, October 2, 2014 9:08 AM
  • It will eventually suspend if you switch away from it. You have to wait.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, October 2, 2014 2:20 PM
  • It will eventually suspend if you switch away from it. You have to wait.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    how long time i have to wait after switched away??
    Friday, October 10, 2014 1:04 AM
  • If you're in debug mode, it doesn't suspend because it's being debugged.  A deployed (non-debug) app will suspend after 5 seconds.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, October 10, 2014 12:47 PM