Inércia Sensorial

08 de November de 2012

Javascript function to find background task by name on Windows 8

Filed under: Javascript — Tags: — inerte @ 15:59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FindTask: function (taskName) {
    var background = Windows.ApplicationModel.Background;
    var iter = background.BackgroundTaskRegistration.allTasks.first();
    var hascur = iter.hasCurrent;
 
    while (hascur) {
        var cur = iter.current.value;
 
        if (cur.name === taskName) {
            return cur;
        }
 
        hascur = iter.moveNext();
    }
 
    return null;
}

1 Comment »

  1. Bomdia e compania

    Comment by rilane — 29 de March de 2019 @ 12:08

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress