locked
How to handle Screen Lock and re-active Screen

    Question

  • Hi, It seems the screen live is short and I need some clarifications.

    1. When screen lock occurs.

    will it cause :

    a) Application suspension and all background tasks will stop as well?

    b) Or depends how OS handle the situation to call for app suspension.

    2. When pressing the hardware side button on top (start button) , this will re-activate the screen from screenlock.

       With this re-activated screen, I need  re start all the background task?  So, is re-activated screen  same as resume event ?

    3. When user press the Hardware Home button, will this cause Suspension or termination? It seems the system will bring up the page when you left off.

    for (3), I need to handle this:

    a) Where and how to save a value ="AutoSuspend" when user press hardware home button. Do I use resume event and get this value so that I know the user has pressed the Hardware home button.

    Thanks

    Friday, March 21, 2014 8:04 AM

All replies

  • 1) Applications will suspend after 5 seconds. Background tasks will continue to run on their expected schedule.

    2) Background tasks run at specified times, or on system conditions.  See http://msdn.microsoft.com/en-us/library/windows/apps/Hh977046.aspx.

    3) This causes suspension.  Why does it matter how the app went into suspend mode?


    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, March 21, 2014 3:11 PM
    Moderator
  • Hi, I got feedback from customer for my mobile sales app.

    1. Sales personnel needs to talk to customer when taking order. Conversation will take time and the screen will lockup after a short period of small chat. What I can do for this case?

    2. sometimes sales personnel click home button thinking it has closed my app COMPLETELY. and sometimes they leave the Tablet on table and forget to take back to office. In this case, when people get hold the tablet and click the app, it will get into my app and start creating fake orders.....

    So, I need to detect for case(2). If sales personnel click the Home button, I need to ask for credential when the page show up or do something.

    So, I need to store a value.

    Thanks

    Saturday, March 22, 2014 10:29 AM