locked
Can we run event OnpostionChanged (geolocation) in background in metro style apps ?

    Question

  • Hi,

        does  onpositionchanged event (geolocation) works in the background ?

       In metro style apps (HTML and JavaScript)

    Thanks

    Wednesday, August 29, 2012 3:58 AM

Answers

  • OK, I think I understand.  Remember that background tasks do not run continuously.  That would be very bad!  Please review this document to understand background tasks and how they should be used: http://www.microsoft.com/en-us/download/details.aspx?id=27411

    You should register for that event in your application, and if you application is no longer the active app, it will not receive the notifications.  This is by design.

    -Jeff


    Jeff Sanders (MSFT)

    • Marked as answer by Dino He Friday, September 14, 2012 8:50 AM
    Thursday, August 30, 2012 12:52 PM
    Moderator

All replies

  • Are you having trouble with this?

    What have you tried and debugged regarding the problems you are having?

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, August 29, 2012 8:27 PM
    Moderator
  • Are you having trouble with this?

    What have you tried and debugged regarding the problems you are having?

    -Jeff


    Jeff Sanders (MSFT)


        I have registered 'positionchanged' event in the background, but when position changes no event triggers. Can you help with this by giving any samples of the same. And iam using C# for that.
    Thursday, August 30, 2012 7:34 AM
  • OK, I think I understand.  Remember that background tasks do not run continuously.  That would be very bad!  Please review this document to understand background tasks and how they should be used: http://www.microsoft.com/en-us/download/details.aspx?id=27411

    You should register for that event in your application, and if you application is no longer the active app, it will not receive the notifications.  This is by design.

    -Jeff


    Jeff Sanders (MSFT)

    • Marked as answer by Dino He Friday, September 14, 2012 8:50 AM
    Thursday, August 30, 2012 12:52 PM
    Moderator