locked
Win RT 8.1 Background task with InternetAvailable condition

    Question

  • Hello,

    My background task is not triggered.
    I am testing my app on Desktop Windows 8.1, triggering this task from debugger's "Lifecycle Events" option is working. Then i decided to test how this task triggers on timer. I attached debugger to the app and waited for about 50 minutes... nothing was happened. Then i just ran it via "Lifecycle Events" and it completed successfully.

    Question:
    Why my background task is not triggered?
    I am using this type of trigger:

    Register(new TimeTrigger(15, false), "TASK_ID", "TASK_NAME", new SystemCondition(SystemConditionType.InternetAvailable));
    Docs said: "Specifies that the background task can only run when the Internet is available. If a background task with the InternetAvailable condition is triggered, and the Internet is not available, the task will not run until the Internet is available again."
    Thats exactly what i need! But, my internet is always available on my computer, why it isn't triggered?

    To confirm my thoughts about this i went to my network settings and turn off my Ethernet completely, waited for about 5 sec, turn it on and... my background task was triggered.


    • Edited by Venexz Sunday, August 24, 2014 10:30 AM
    Sunday, August 24, 2014 10:29 AM

Answers

All replies

  • It looks like it works... maybe it was some debugging problems, because the app not in Release state.
    Sunday, August 24, 2014 5:02 PM
  • Nice to know.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 25, 2014 2:12 AM
    Moderator