The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[W10M][UWP App] Background Task Stopped while Lockscreen RRS feed

  • Question

  • Hi.
    I'm using the Background Task in my UWP Application.
    and I go to suspend device and resume (Power Button Press) for the Lockscreen.
    .
    However, after 10 minutes... the Background Task is stopped.
    And Background Task status is OnCompleted.
    But, I'm not use the stop code in my UWP App with Background Task.
    My Background Task is really continues loop and timer.
    .
    I hope continues running the Background Task while LockScreen state.
    If you know this problem, please let me know.
    Thanks.
    Jack.
    Tuesday, July 5, 2016 11:26 AM

Answers

  • Hi Muipo.

    I do resolved this issue.

    It's using the Background Task by the DeviceUseTrigger.

    The DeviceUseTrigger is work fine on LockScreen.

    Thanks your response.

    Jack.



    • Marked as answer by jack.hong Wednesday, July 6, 2016 1:00 AM
    • Edited by jack.hong Wednesday, July 6, 2016 1:02 AM
    • Unmarked as answer by jack.hong Wednesday, July 6, 2016 1:02 AM
    • Marked as answer by jack.hong Wednesday, July 6, 2016 1:02 AM
    Wednesday, July 6, 2016 12:59 AM

All replies

  • Background tasks does have restriction on their time of execution. It's not caused by screen lock but your task had depleted its quota.

    Read about it here.

    Universal Windows app model is by design doesn't support indefinite background execution. There are many triggers which allow your background tasks to execute on specific event. For example, on receiving data from network.

    Tuesday, July 5, 2016 5:50 PM
  • Hi Muipo.

    I do resolved this issue.

    It's using the Background Task by the DeviceUseTrigger.

    The DeviceUseTrigger is work fine on LockScreen.

    Thanks your response.

    Jack.



    • Marked as answer by jack.hong Wednesday, July 6, 2016 1:00 AM
    • Edited by jack.hong Wednesday, July 6, 2016 1:02 AM
    • Unmarked as answer by jack.hong Wednesday, July 6, 2016 1:02 AM
    • Marked as answer by jack.hong Wednesday, July 6, 2016 1:02 AM
    Wednesday, July 6, 2016 12:59 AM
  • Hi jack.hong,

    Thank you for sharing solution with us.

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 6, 2016 2:36 AM