This document discusses fast application switching and tombstoning on Windows Phone. It describes how there is only one active app at a time and apps can be dormant (in memory but not running) or tombstoned (removed from memory). It provides examples of using application state management methods to save and restore state when an app becomes dormant or tombstoned. The document also demonstrates how to determine resume type and manage resources during activation and deactivation.
What's new in Windows Phone Mango for DevelopersGlen Gordon
The document discusses new features in Windows Phone Mango, including fast application switching, background agents, live tiles, and XNA/Silverlight integration. It demonstrates fast application switching and how applications can be resumed from a dormant or tombstoned state. It also covers using background agents for periodic and resource intensive tasks, debugging background tasks, and using the background transfer service to download files even when the app is not running. Scheduled notifications for reminders and alarms are also discussed.
What's new in Windows Phone Mango for DevelopersGlen Gordon
The document discusses new features in Windows Phone Mango, including fast application switching, background agents, live tiles, and XNA/Silverlight integration. It demonstrates fast application switching and how applications can be resumed from a dormant or tombstoned state. It also covers using background agents for periodic and resource intensive tasks, debugging background tasks, and using the background transfer service to download files even when the app is not running. Scheduled notifications for reminders and alarms are also discussed.
This document summarizes cool features that an app can utilize on Windows Phone, including:
- Storage and tombstoning to preserve app state when switching between apps or restarting the phone.
- Alarms and reminders to schedule notifications for time-based events.
- Live tiles to provide dynamic content and notifications on the Start screen.
- Other features like contests and resources that make app development easier.
This document discusses mobile app development for Windows Phone. It covers topics like app lifecycles, tombstoning, activating and deactivating apps, using alarms and reminders, and restricted capabilities in the background.
The document discusses key features of the Windows Phone application platform. It highlights how Windows Phone puts people at the center through integration with social networks like Facebook and Twitter. It also discusses how apps can be pinned to the start screen for live updates, and how the Windows Phone app model and tools make developing apps easier. The document also provides an overview of the Windows Phone emulator, profiler, and Marketplace for submitting apps.
Windows Phone 7 "Mango" provides several new capabilities for developers including enhanced multitasking, faster application resuming, background agents, notifications, and background transfer services. Mango allows applications to run in the background or resume quickly. It enables setting alarms and reminders as well as queuing file transfers. The update aims to improve the user experience with multitasking and provide more opportunities for applications to integrate with the phone's capabilities.
View Tab:
Manage Tab:
Share Tab:
Info Tab:
New Tab:
Open Tab:
Save Tab:
Print Tab:
Close Tab:
Help Tab:
Backstage View:
Quick Access Toolbar:
File Tab:
Home Tab:
Share Tab:
View Tab:
Manage Tab:
Info Tab:
New Tab:
Open Tab:
Save Tab:
Print Tab:
Close Tab:
Help Tab:
Backstage View:
Quick Access Toolbar:
File Tab:
Home Tab:
Share Tab
This document discusses Windows Phone 7.1 multitasking capabilities. It provides an overview of the application lifecycle in WP7, including launching, closing, activating, and deactivating. It then discusses the dormant state and background tasks introduced in WP7.1 Mango. Background tasks allow an app to run code periodically or when resources are available, through a background agent that runs independently of the main app. The document includes code examples and demos.
The document discusses the application lifecycle on mobile devices and how developers should handle interruptions, user expectations, and different lifecycle events. It covers topics like tombstoning, where the application is dead but some state is saved, and how restoring state is important for a good user experience. Code samples demonstrate saving state on deactivation and restoring it on activation. Managing resources properly during lifecycle events is required for apps to be published.
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...DroidConTLV
This document discusses location tracking services and how to adapt them for Android's Doze and App Standby power saving modes. It explains that location tracking services need to continue running even when apps are idle. It provides examples of using AlarmManager and WakeLocks to schedule location sampling and ensure the CPU is on. It also discusses using high priority notifications and whitelisting to optimize services for Doze/Standby. The document stresses the importance of testing adaptations thoroughly.
The document provides an overview of Windows Phone SDK 7.1 and previews upcoming features in Windows Phone 8. It discusses the Windows Phone SDK 7.1 architecture, execution model, controls, live tiles, isolated storage, and multitasking capabilities. It also outlines some new platform features for Windows Phone 8 including support for multiple resolutions, speech recognition, updated tile and notification templates, the lock screen, in-app purchasing, and proximity/Bluetooth APIs.
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
This document summarizes a presentation on Windows Phone 7 development. It discusses orientation support, the application lifecycle, tombstoning, and optimizing performance. Developers must handle orientation changes, save and restore application state as it moves between active and inactive states, and optimize resource usage and tombstoning to ensure good performance. The document also covers other topics like the application bar, push notifications, and Windows Phone development best practices.
This document provides an overview and introduction to developing applications for the Windows 8 platform. It discusses WinRT basics, best practices, pickers, contracts, tiles, notifications, and process lifetime management. The presenter provides resources for samples, libraries, and tools to help with development for Windows 8.
An Android application is composed of activities, services, and content providers. Activities display user interfaces and are launched by intents. The context provides access to application-wide resources and functionality. Activities have a lifecycle of states like resumed, paused, and stopped that are called back through methods to manage resources. Intents are used to transition between activities within an app or launch other apps' components.
Sinergija 11 WP7 Mango multitasking and “multitasking”Catalin Gheorghiu
This document provides an overview and summary of multitasking capabilities in Windows Phone 7 (WP7) and how they have evolved with the Mango update.
The key points are:
1) WP7 originally had limited multitasking support for applications, but Mango introduced new dormant and background states to better support applications running in the background.
2) Mango allows applications to receive notifications of state changes and save state when dormant. It also supports background agents or tasks that can run when the application is not in the foreground.
3) There are two types of background tasks - periodic tasks that run every 30 minutes, and resource-intensive tasks that run when the phone is
OPERATING SYSTEM BY DR .MUGABO MG MKAMAMugabo Mkama
The document discusses operating system concepts including process management, storage management, and I/O management. It describes key components of an operating system like the kernel, shell, and memory manager. It explains how the operating system allocates memory and storage, schedules processes using techniques like paging and swapping, and manages I/O. Process states like ready, running, waiting, and terminated are also defined.
This document discusses background agents on Windows Phone 8. It explains that background agents allow applications to perform tasks even when they are not in the foreground. There are two types of background agents: periodic agents, which run every 30 minutes to perform regular short tasks, and resource-intensive agents, which run when the phone has available resources to perform longer tasks. The document provides examples of using background agents to log location data periodically even when an application is closed. It also discusses how to schedule, debug, and share data between the foreground application and background agents.
The document discusses the role, types, modes, features and functions of operating systems. It describes how operating systems control hardware and software, enable communication, and provide human interfaces. It also outlines operating system monitoring of systems, modes like single-user and multi-user, types including standalone and networked, and interfaces used by operating systems.
The document discusses Android's process and memory management. It explains that each Android application runs in its own process with its own Dalvik virtual machine instance. The Android runtime manages application processes and stops or kills processes as needed to free up resources for higher priority applications. Process priority is determined by application component priority, with foreground processes like activities and foreground services having the highest priority and more likely to remain running. The runtime uses a least recently used approach to determine which background processes to kill first when reclaiming memory.
1) Background agents allow Windows Phone applications to perform tasks even when they are not in the foreground. There are two types of background agents: periodic agents that run every 30 minutes and resource intensive agents that run when the phone is charging.
2) Background agents have limited access to phone resources and can only run for a maximum of 25 seconds for periodic agents and 10 minutes for resource intensive agents.
3) The document provides examples of using background agents to perform periodic location tracking, file transfers, and audio playback even when the main application is not active.
This presentation on Android OS contains basic and core concepts of Android Operation System, like Android Architecture, Dalvik Virtual Machine, Process Management, Memory Management, Application and Service life cycle, etc...
[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache luceneQIRIS
The document discusses Apache Lucene, an open-source information retrieval library. It describes Lucene's indexing and searching capabilities, including its vector space model and use of inverted indexes. The document also provides an overview of Lucene's architecture and APIs for indexing, searching, and analyzing document contents.
This document summarizes cool features that an app can utilize on Windows Phone, including:
- Storage and tombstoning to preserve app state when switching between apps or restarting the phone.
- Alarms and reminders to schedule notifications for time-based events.
- Live tiles to provide dynamic content and notifications on the Start screen.
- Other features like contests and resources that make app development easier.
This document discusses mobile app development for Windows Phone. It covers topics like app lifecycles, tombstoning, activating and deactivating apps, using alarms and reminders, and restricted capabilities in the background.
The document discusses key features of the Windows Phone application platform. It highlights how Windows Phone puts people at the center through integration with social networks like Facebook and Twitter. It also discusses how apps can be pinned to the start screen for live updates, and how the Windows Phone app model and tools make developing apps easier. The document also provides an overview of the Windows Phone emulator, profiler, and Marketplace for submitting apps.
Windows Phone 7 "Mango" provides several new capabilities for developers including enhanced multitasking, faster application resuming, background agents, notifications, and background transfer services. Mango allows applications to run in the background or resume quickly. It enables setting alarms and reminders as well as queuing file transfers. The update aims to improve the user experience with multitasking and provide more opportunities for applications to integrate with the phone's capabilities.
View Tab:
Manage Tab:
Share Tab:
Info Tab:
New Tab:
Open Tab:
Save Tab:
Print Tab:
Close Tab:
Help Tab:
Backstage View:
Quick Access Toolbar:
File Tab:
Home Tab:
Share Tab:
View Tab:
Manage Tab:
Info Tab:
New Tab:
Open Tab:
Save Tab:
Print Tab:
Close Tab:
Help Tab:
Backstage View:
Quick Access Toolbar:
File Tab:
Home Tab:
Share Tab
This document discusses Windows Phone 7.1 multitasking capabilities. It provides an overview of the application lifecycle in WP7, including launching, closing, activating, and deactivating. It then discusses the dormant state and background tasks introduced in WP7.1 Mango. Background tasks allow an app to run code periodically or when resources are available, through a background agent that runs independently of the main app. The document includes code examples and demos.
The document discusses the application lifecycle on mobile devices and how developers should handle interruptions, user expectations, and different lifecycle events. It covers topics like tombstoning, where the application is dead but some state is saved, and how restoring state is important for a good user experience. Code samples demonstrate saving state on deactivation and restoring it on activation. Managing resources properly during lifecycle events is required for apps to be published.
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...DroidConTLV
This document discusses location tracking services and how to adapt them for Android's Doze and App Standby power saving modes. It explains that location tracking services need to continue running even when apps are idle. It provides examples of using AlarmManager and WakeLocks to schedule location sampling and ensure the CPU is on. It also discusses using high priority notifications and whitelisting to optimize services for Doze/Standby. The document stresses the importance of testing adaptations thoroughly.
The document provides an overview of Windows Phone SDK 7.1 and previews upcoming features in Windows Phone 8. It discusses the Windows Phone SDK 7.1 architecture, execution model, controls, live tiles, isolated storage, and multitasking capabilities. It also outlines some new platform features for Windows Phone 8 including support for multiple resolutions, speech recognition, updated tile and notification templates, the lock screen, in-app purchasing, and proximity/Bluetooth APIs.
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
This document summarizes a presentation on Windows Phone 7 development. It discusses orientation support, the application lifecycle, tombstoning, and optimizing performance. Developers must handle orientation changes, save and restore application state as it moves between active and inactive states, and optimize resource usage and tombstoning to ensure good performance. The document also covers other topics like the application bar, push notifications, and Windows Phone development best practices.
This document provides an overview and introduction to developing applications for the Windows 8 platform. It discusses WinRT basics, best practices, pickers, contracts, tiles, notifications, and process lifetime management. The presenter provides resources for samples, libraries, and tools to help with development for Windows 8.
An Android application is composed of activities, services, and content providers. Activities display user interfaces and are launched by intents. The context provides access to application-wide resources and functionality. Activities have a lifecycle of states like resumed, paused, and stopped that are called back through methods to manage resources. Intents are used to transition between activities within an app or launch other apps' components.
Sinergija 11 WP7 Mango multitasking and “multitasking”Catalin Gheorghiu
This document provides an overview and summary of multitasking capabilities in Windows Phone 7 (WP7) and how they have evolved with the Mango update.
The key points are:
1) WP7 originally had limited multitasking support for applications, but Mango introduced new dormant and background states to better support applications running in the background.
2) Mango allows applications to receive notifications of state changes and save state when dormant. It also supports background agents or tasks that can run when the application is not in the foreground.
3) There are two types of background tasks - periodic tasks that run every 30 minutes, and resource-intensive tasks that run when the phone is
OPERATING SYSTEM BY DR .MUGABO MG MKAMAMugabo Mkama
The document discusses operating system concepts including process management, storage management, and I/O management. It describes key components of an operating system like the kernel, shell, and memory manager. It explains how the operating system allocates memory and storage, schedules processes using techniques like paging and swapping, and manages I/O. Process states like ready, running, waiting, and terminated are also defined.
This document discusses background agents on Windows Phone 8. It explains that background agents allow applications to perform tasks even when they are not in the foreground. There are two types of background agents: periodic agents, which run every 30 minutes to perform regular short tasks, and resource-intensive agents, which run when the phone has available resources to perform longer tasks. The document provides examples of using background agents to log location data periodically even when an application is closed. It also discusses how to schedule, debug, and share data between the foreground application and background agents.
The document discusses the role, types, modes, features and functions of operating systems. It describes how operating systems control hardware and software, enable communication, and provide human interfaces. It also outlines operating system monitoring of systems, modes like single-user and multi-user, types including standalone and networked, and interfaces used by operating systems.
The document discusses Android's process and memory management. It explains that each Android application runs in its own process with its own Dalvik virtual machine instance. The Android runtime manages application processes and stops or kills processes as needed to free up resources for higher priority applications. Process priority is determined by application component priority, with foreground processes like activities and foreground services having the highest priority and more likely to remain running. The runtime uses a least recently used approach to determine which background processes to kill first when reclaiming memory.
1) Background agents allow Windows Phone applications to perform tasks even when they are not in the foreground. There are two types of background agents: periodic agents that run every 30 minutes and resource intensive agents that run when the phone is charging.
2) Background agents have limited access to phone resources and can only run for a maximum of 25 seconds for periodic agents and 10 minutes for resource intensive agents.
3) The document provides examples of using background agents to perform periodic location tracking, file transfers, and audio playback even when the main application is not active.
This presentation on Android OS contains basic and core concepts of Android Operation System, like Android Architecture, Dalvik Virtual Machine, Process Management, Memory Management, Application and Service life cycle, etc...
Similar to follow-app BOOTCAMP 2: Windows phone fast application switching (20)
[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache luceneQIRIS
The document discusses Apache Lucene, an open-source information retrieval library. It describes Lucene's indexing and searching capabilities, including its vector space model and use of inverted indexes. The document also provides an overview of Lucene's architecture and APIs for indexing, searching, and analyzing document contents.
follow-app BOOTCAMP 2: Introduction to silverlightQIRIS
This document provides an introduction to the Silverlight development framework and Windows Phone development. It discusses key Silverlight concepts like the Metro design style, components, layout, and events. It demonstrates how to create a basic Silverlight application with XAML and C# code. It also covers Windows Phone specific topics such as project templates, the application bar, and page navigation.
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...QIRIS
This document discusses building Windows Phone applications with Visual Studio 2010. It describes the Windows Phone developer tools, Visual Studio, the Windows Phone emulator, and the Windows Phone profiler. The emulator allows testing and debugging applications without a physical device. Visual Studio provides an integrated development environment and debugging capabilities. The profiler helps optimize applications by identifying performance bottlenecks.
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications QIRIS
This document discusses live tiles, push notifications, and updating tiles on Windows Phone. It covers the end user experience of live tiles that provide glanceable information on the home screen. Push notifications allow sending timely updates even when apps aren't running. Tiles can be updated locally from the foreground or background, or through push notifications. The document demonstrates updating tiles from a background agent and with push notifications. It also discusses tile templates, scheduling updates, and security aspects of the notification system.
Ogni impresa nasce da un’idea che risolva un problema. Sia essa un negozio di abbigliamento o un’impresa innovativa che produce una nuova molecola, non esiste azienda senza un’idea imprenditoriale in grado di soddisfare un bisogno. Durante il seminario si comprenderanno i fattori che permettono di valutare un’idea e di comprendere se e in che modo vale la pena di farla diventare un business e di essere accolta dal mercato.
Ogni impresa nasce da un’idea che risolva un problema. Sia essa un negozio di abbigliamento o un’impresa innovativa che produce una nuova molecola, non esiste azienda senza un’idea imprenditoriale in grado di soddisfare un bisogno. Durante il seminario si comprenderanno i fattori che permettono di valutare un’idea e di comprendere se e in che modo vale la pena di farla diventare un business e di essere accolta dal mercato.
Ogni impresa nasce da un’idea che risolva un problema. Sia essa un negozio di abbigliamento o un’impresa innovativa che produce una nuova molecola, non esiste azienda senza un’idea imprenditoriale in grado di soddisfare un bisogno. Durante il seminario si comprenderanno i fattori che permettono di valutare un’idea e di comprendere se e in che modo vale la pena di farla diventare un business e di essere accolta dal mercato.
La frase “Entrepreneurs don’t just eat, they like to bake” di Guy Kawasaki illustra perfettamente la figura dell’imprenditore. In particolare, essere uno start-upper vuol dire assecondare consapevolemente il proprio spirito intraprendente e accettare una sfida durissima di sacrificio e di passione. Una vocazione piuttosto che una scelta. Nel corso del seminario sono stati illustrati i tipi di imprenditori e gli errori classici da evitare nel proprio percorso imprenditoriale, in modo da creare valore per sé e per gli altri.
La frase “Entrepreneurs don’t just eat, they like to bake” di Guy Kawasaki illustra perfettamente la figura dell’imprenditore. In particolare, essere uno start-upper vuol dire assecondare consapevolemente il proprio spirito intraprendente e accettare una sfida durissima di sacrificio e di passione. Una vocazione piuttosto che una scelta. Nel corso del seminario sono stati illustrati i tipi di imprenditori e gli errori classici da evitare nel proprio percorso imprenditoriale, in modo da creare valore per sé e per gli altri.
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapitolTechU
Slides from a Capitol Technology University webinar held June 20, 2024. The webinar featured Dr. Donovan Wright, presenting on the Department of Defense Digital Transformation.
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxOH TEIK BIN
(A Free eBook comprising 3 Sets of Presentation of a selection of Puzzles, Brain Teasers and Thinking Problems to exercise both the mind and the Right and Left Brain. To help keep the mind and brain fit and healthy. Good for both the young and old alike.
Answers are given for all the puzzles and problems.)
With Metta,
Bro. Oh Teik Bin 🙏🤓🤔🥰
A Visual Guide to 1 Samuel | A Tale of Two HeartsSteve Thomason
These slides walk through the story of 1 Samuel. Samuel is the last judge of Israel. The people reject God and want a king. Saul is anointed as the first king, but he is not a good king. David, the shepherd boy is anointed and Saul is envious of him. David shows honor while Saul continues to self destruct.
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
How to Download & Install Module From the Odoo App Store in Odoo 17Celine George
Custom modules offer the flexibility to extend Odoo's capabilities, address unique requirements, and optimize workflows to align seamlessly with your organization's processes. By leveraging custom modules, businesses can unlock greater efficiency, productivity, and innovation, empowering them to stay competitive in today's dynamic market landscape. In this tutorial, we'll guide you step by step on how to easily download and install modules from the Odoo App Store.
2. Topics
The Windows Phone execution model
Application State Management
Fast Application Switching
Dormant programs and Tombstoning
Application Navigation and Application Switching
2 Windows Phone
7. Finding the Resume type
private void Application_Activated(object sender, ActivatedEventArgs e)
{
if (e.IsApplicationInstancePreserved)
{
// Dormant - objects in memory intact
}
else
{
// Tombstoned - need to reload
}
}
The Activation handler can test a flag to determine the type of resume
taking place
7 Windows Phone
8. Deactivation Resource Management
MediaPlayer.Pause
MediaElement.Pause
SoundEffectInstance.Pause
VibrateController.Stop
PhotoCamera.Dispose
Save page/global state
XNA Audio Paused
Sensors Notifications suppressed
Networking Cancelled
Sockets Disconnected
MediaElement Disconnected
Camera Disposed
8 Windows Phone
9. Activation Resource Management
MediaElement.Source/Position/
Play
Socket.ConnectAsync
new PhotoCamera/VideoCamera
Restore app state if tombstoned
XNA Audio Resumed
Sensors Notifications resumed
Networking Completed with Cancellation
Sockets -
MediaElement -
Camera -
9 Windows Phone
10. Isolated Storage vs State Storage
Isolated storage is so called because the data for an application is
isolated from all other applications
It can be used as filestore where an application can store folders
and files
It is slow to access, since it is based on NVRAM technology
It can also be used to store name/value pairs, e.g. program
settings
State storage is so called because it is used to hold the state of an
application
It can be used to store name/value pairs which are held in memory
for dormant or tombstoned applications
It provides very quick access to data
1
Windows Phone 10
0
12. Fast App Switching and
Tombstoning Review
Only one Windows Phone application is Active at any time
The Start and Back buttons on the phone are used to start new
applications and return to previously used ones
If an application is replaced by another it is either made Dormant (still in
memory but not running) or Tombstoned (removed from memory)
Applications must use populate methods provided in the App.xaml.cs
class to save and retrieve state information when appropriate
State can be stored in memory for quick reload and in isolated
storage which serve as a permanent store
1
Windows Phone 12
2
14. Multitasking Capabilities
Background Agents
Periodic
Resource Intensive
Background Transfer Service
Alarms and Reminders
Background Audio
1
Windows Phone 14
4
15. Background Agents
Agents
Periodic
Resource Intensive
An app may have up to one of each
Initialized in foreground, run in background
Persisted across reboots
User control through CPL
System maximum of 18 periodic agent
Agent runs for up to 14 days (can be renewed)
1
Windows Phone
5
19. Debugging a Background Task
#if DEBUG_AGENT
ScheduledActionService.LaunchForTest(taskName,
TimeSpan.FromSeconds(60));
#endif
It would be annoying if we had to wait 30 minutes to get code in the
agent running so we could debug it
When we are debugging we can force service to launch itself
Such code can be conditionally compiled and removed before the
production version is built
1
Windows Phone 19
9
20. Debugging the Agent Code
When you use the Back button or Start on the phone to interrupt an
application with an active Background Task ,Visual Studio does not
stop running
It remains attached to the application
You can then put breakpoints into the background task application and
debug them as you would any other program
You can single step, view the contents of variables and even change
them using the Immediate Window
This is also true if you are working on a device rather than the emulator
The same techniques work on ResourceIntensiveAgents
2
Windows Phone 20
0
22. File Transfer Tasks
It is also possible to create a background task to transfer files to and
from your application’s isolated storage
The transfers will continue to work even when the application is not
running
An application can monitor the state of the downloads and display their
status
Files can be fetched from HTTP or HTTPs hosts
At the moment FTP is not supported
The system maintains a queue of active transfers and services each
one in turn
Applications can query the state of active transfers
2
Windows Phone 22
2
23. Background Transfer Policies
There are a set of policies that control transfer behaviour
Maximum Upload file size: 5Mb
Maximum Download file size over cellular (mobile phone) data:
20Mb
Maximum Download file size over WiFi: 100Mb
These can be modified by setting the value of TransferPreferences
on a particular transfer
2
Windows Phone 23
3
24. Transfer Management
An application can find out how many file transfers it has active
It will have to do this when it is restarted, as file transfers will
continue even when the application is not running
It can then perform transfer management as required
There is a good example of transfer list management on MSDN:
http://msdn.microsoft.com/en-us/library/hh202953.aspx
2
Windows Phone
4
26. Scheduled Notifications
Time-based, on-phone notifications
Supports Alerts & Reminders
Persist across reboots
Adheres to user settings
Consistent with phone UX
2
Windows Phone 26
6
27. Alarms vs Reminders?
Alarms Remind
ers
• Modal • Rich information
• Snooze and Dismiss • Integrates with other
• Sound customization reminders
• No app invocation • Snooze and Dismiss
• No stacking • Launch app
• Follows the phones global
27 settings
28. Creating a Reminder
using Microsoft.Phone.Scheduler;
...
eggReminder = new Reminder("Egg Timer");
eggReminder.BeginTime = DateTime.Now + new TimeSpan(0, eggTime, 0);
eggReminder.Content = "Egg Ready";
eggReminder.RecurrenceType = RecurrenceInterval.None;
eggReminder.NavigationUri = new Uri("/EggReadyPage.xaml",
UriKind.Relative);
ScheduledActionService.Add(eggReminder);
This code creates a reminder and adds it as a scheduled service
The value eggTime holds the length of the delay
This code also sets the url of the page in the application
2
Windows Phone 28
8
29. Reminder Housekeeping
Reminder eggReminder = ScheduledActionService.Find("Egg Timer")
as Reminder;
if ( eggReminder != null )
{
ScheduledActionService.Remove("Egg Timer");
}
Reminders are identified by name
This code finds the “Egg Timer” reminder and then removes it from the
scheduler
2
Windows Phone 29
9
31. Audio Playback Agents
It is also possible to create
an Audio Playback Agent
that will manage an
application controlled
playlist
The mechanism is the
same as for other
background tasks
The audio can be
streamed or held in the
application isolated
storage
3
Windows Phone 31
1
32. Background Audio
Playback
App provides URL or stream to Zune
Audio continues to play even if app is closed
App is notified of file or buffer near completion
Phone Integration
Music & Video Hub
Universal Volume Control (UVC), lauch app, controls, contextual
info
Contextual launch – Start menu, UVC, Music & Video Hub
App Integration
App can retrieve playback status, progress, & metadata
Playback notification registration
3
Windows Phone 32
2
33. Review
An application can create background processes
Periodic Task and ResourceIntensive task run when the
application is stopped
Scheduled notifications will fire whether the application is running
or not
Audio Playback run alongside the application
Applications and their background processes can communicate via
isolated storage
Visual Studio can be used to debug background tasks in the same way
as foreground applications
3
Windows Phone 33
3