think most Windows Store app developers will know this, but now it gets important for Phone developers too. With the new Windows Phone release the whole architecture how to build an app from windows store apps will be coming to Windows Phone.
Windows Store apps has the concept of BackgroundTasks. These tasks can run on the background and provide functionality to the end user without the new to start up the app. It can be used to update data, or update the live tile for example.
A background tasks is register in the app and a BackgroundTask needs a trigger when it runs, this can be a timetrigger, which triggers a task every x minutes, or a push notification for example.
To debug these background tasks can be little hard if you going to really trigger the event you bound. Like in case of a timetrigger wait x minutes till your tasks get triggers. X needs to be at least 15 minutes which makes it a time consuming operation.
Lucky microsoft found nice solution for it, although it is bit hidden. You can trigger a Backgroundtasks that is registered from Visual Studio. To do this start debugging you application. Then go to View -> Toolbars -> Debug Location
Then you click on the Lifecycle events button and you can test suspending, resume, suspend and shutdown but also trigger almost all your background tasks.
- cute how @MicrosoftTeams restart due a glitch when you close the app... makes me wonder what they think the glitch… https://t.co/2TwilGiy1F
- Goodie incoming :)
- @danhellem @AzureDevOps awesome! :)
- @sandeepchads @AzureDevOps it's not there anymore; the morning i had the feature had a banner in the top of the page that had a button "try"
- @sandeepchads @AzureDevOps I had the feature yesterday morning on my environment and in the evening it was gone again 😭
- @markscholman @windowsdev Thanks! Jij ook!
- Another year @windowsdev MVP #MVPBuzz https://t.co/blu1TMBO0E
- RT @kevintgallo: Check it out https://t.co/F9exR1pQMx
- RT @stanzillaz: The new Windows Terminal is now on the Store https://t.co/n8rjsg19dv #WindowsInsiders
- @tfsbuck maybe not that clear as i was using my phone. in the release note notification I still see the annoucement… https://t.co/tx8DDm36q8