,

Background Tasks

Background tasks refer collectively to actions that are registered with the phone OS to run in the background, and that occupy the following four distinct areas of application functionality:

Image Scheduled notifications

Image Scheduled tasks

Image Background file transfers

Image Background audio

Of these, scheduled notifications are the simplest to use and understand. They are notifications that can be set from your app to display a message to the user at some time in the future.

Scheduled tasks allow you to register a class containing a method that is called periodically, even when your app is not running. They are multipurpose and offer the greatest utility for extending your app to perform background activities. Scheduled tasks may be used to perform some action periodically, such as querying a cloud service and updating a live tile, or they may be used to perform a less-frequent resource-intensive action, such as batch processing a set of images.

Transferring large files is difficult when your app may be tombstoned or closed at any time. The phone includes a background file transfer system that allows you to request a file to be downloaded from the Web to isolated storage, or uploaded from isolated storage to a cloud service.

Windows Phone devices generally offer a rich multimedia experience for users. Users today are frequently forgoing a dedicated audio device and turning instead to the phone to play audio. Windows Phone allows you to build an audio app that can respond to the phone’s built-in play controls, even when your app is not running.

The following sections explore scheduled notification and scheduled tasks in detail. Background file transfers and background audio are discussed in subsequent chapters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.113.128