UWP modern standby wakeup with TimeTrigger and run indefinitely

Martin Balous 1 Reputation point
2021-01-26T15:03:48.523+00:00

Hi dev community,
I have several question regarding the Windows 10 modern standby.
https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/integrating-apps-with-modern-standby

  • How do <rescap:Capability Name="extendedExecutionUnconstrained"/> and <rescap:Capability Name="extendedBackgroundTaskTime"/> cooperate together with the modern standby?
  • When the extended execution session is active and I press the power button on a device that supports modern standby what happens?
  • When a TimeTrigger activates my background task and my app uses the extendedBackgroundTaskTime restricted capability, will the task just run indefinitely?
  • Are TimeTriggers actually active in modern standby?

Thank you,
Martin

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Yan Gu - MSFT 2,676 Reputation points
    2021-02-23T02:07:26.933+00:00

    Hello,

    Welcome to Microsoft Q&A.

    After consulting other engineers and doing a bunch of testing, here is conclusions:

    How do <rescap:Capability Name="extendedExecutionUnconstrained"/> and <rescap:Capability Name="extendedBackgroundTaskTime"/> cooperate together with the modern standby?

    If you add the above capabilities, the background task will run uninterrupted.

    When the extended execution session is active and I press the power button on a device that supports modern standby what happens?

    The background task will continue to run, since modern standby would only affect the foreground tasks and the timetrigger will continue uninterrupted since it is a process that is allowed to run while a machine is in standby.

    When a TimeTrigger activates my background task and my app uses the extendedBackgroundTaskTime restricted capability, will the task just run indefinitely?

    Yes, the task could run indefinitely. Note when the TimeTrigger is raised a second or a third time, a new task will be created and the currently existing task will still be running. If you don’t need multiple task running at the same time, remember to close old tasks.

    Are TimeTriggers actually active in modern standby?

    Yes, just as what I said above.

    Both these answers are assuming that the machine is not on battery. If the machine enters battery saver mode, then the situation may change and these processes may be suspended.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments