Michael Palermo | @palermo4 Jeremy Foster | @codefoster 02 | App Lifecycle Michael Palermo | @palermo4 Jeremy Foster | @codefoster
Module Overview Launching, suspending, and resuming Testing lifecycle events in Visual Studio File and URI activation Secondary tile activation
Launching, suspending, and resuming
Application Lifecycle
Launch An app is launched whenever it is activated by the user while the process is in the NotRunning state.
Suspend An app can be suspended when the user switches away from it or when the device enters a low power state. Most apps stop running when the user switches away from them. When the user moves an app to the background, the OS waits a few seconds to see whether the user immediately switches back to the app. If the user does not switch back, the OS suspends the app.
Resume A suspended app is resumed when the user switches to it or when the device comes out of a low power state. If a suspended app is activated to participate in an app contract or extension, it receives the resuming event first, then the activated event. When an app is suspended, it does not receive network events that it registered to receive. These events are not queued, they are simply missed. Therefore, your app should test the network status when it is resumed.
Testing Lifecycle Events in Visual Studio
Debug in Visual Studio
File and URI Activation
Declarations In platform project package.appxmanifest files
Please, do try this at home… Start | Run… bingmaps: netflix: asdf: codeshow: nickmetroapp: bingmaps:?q=coffee&where=Seattle
Community Megaphone
Secondary Tile Activation
TileID used in application activation event, available via arguments Secondary Tiles var secondaryTile = new Windows.UI.StartScreen.SecondaryTile("dom"); TileID used in application activation event, available via arguments // in activated event handler… if (args.detail.arguments !== "") { var launchDemo = JSON.parse(args.detail.arguments).launchDemo; if (launchDemo) { // process and navigate } launchDemo == “dom”
Visual Studio: CodeShow Secondary Tile
Summary Launching, suspending, and resuming Testing lifecycle events in Visual Studio File and URI activation Secondary tile activation