SlideShare una empresa de Scribd logo
1 de 17
WINDOWS PHONE 7
MULTITASKING & BACKGROUND
          TASKS


 Rom an Ivasyshyn
   Softj
       ourn Inc.
Topics

    Platform overview

    Multi-Tasking with background agents

    Windows Phone Task Manager

    Background Notifications

    File Transfer Tasks, Music Playback Tasks
Platform overview

    Intelligent OS and well designed API

    Powerful instrumentation and language

    Up to date mobile OS

    WP7 Marketplace now available for Ukraine

    Multitasking

    Push notifications

    Implementation of social network API
Foreground tasks

    Normally a windows phone application runs in
    the foreground

    At any given time one application is running in
    the foreground

    This is to ensure the best performance and
    battery life for the phone user
Background agents

    Windows Phone application can start a
    background agent.
       −   It is PeriodicTask, ResourceIntensiveTask or both at
           same time
       −   There is only one agent allowed per application

    The agent can run only when the main
    application is not in the foreground

    Agent is not equivalent to foreground
    application running in the background
       −   It's limited in what it can do and the access it has the
           processor and other phone facilities
Background Agent restriction

    The number of Agents allowed to be active at one time is
    restricted by the Windows Phone system

    If the right conditions do not arise, Agent will not be
    started
        −   The background agents only run in situations where the system feels
            able to give them access to the processor

    If the phone goes into “Power Saver” mode it may stop
    running background agents completely

    User can also manage the agents running on their phone
    and may chose to disable them

    Don't put any critical logic into yours app background
    agent
Agent and Tasks

    A Task is the container that is managed by the
    operation system and runs at the appointed
    time

    It runs an Agent which does the work
       −   The agent code is called as a method in a class
       −   The class is created as part of a Scheduled Task Agent
           Project

    There are two kinds of Task
       −   Periodic tasks that are runs through a certain period of
           time
       −   Resource intensive tasks that run where the phone in a
           position to let them
Periodic task agent

    A periodic task agent runs every
       −   Typically every 30 minutes or more, depends on phone
           loading

    It is intended to perform a task that should be
    performed regularly and complete quickly
       −   The agent is allowed to run for 25 seconds or less
       −   The phone sets a limit on the maximum number of active
           at any time

    Good for location tracking, polling background
    services etc.
Resource intensive agents

    Resource intensive agents run where the
    phone is in a position where it can usefully
    perform some data processing
       −   Where the phone is powered by the main
       −   Where the phone is connected to WiFi
       −   Where the phone is not being used (locked screen
           displayed)

    A “Resource Intensive”
agent can run for up to
10 minutes
Dual purpose agent

    It is possible for application to perform both
    periodic and resource intensive tasks in the
    same time

    This can be achieved using a single
    background agent class, run from both kind of
    task

    The agent will run periodically and when phone
    is in a position to allow resource intensive work

    When the agent starts it can determine the
    context in which it is running and then behave
    appropriate
Background and Foreground
communication

    For Periodic and Resource-intensive Agents:
       −   LINQ 2 SQL, file in isolated storage that is guarded with a
           Mutex.
       −   Avoid IsolatedStorageSettings

    For Audio Agents: Store custom data in the Tag
    property of the AudioTrack class.

    Use methods NotifyConplete or Abort to set
    state flag

    Toast and Tile notification
Windows Phone Task Manager
File transfer tasks

    It is also possible to create a background task
    to transfer files to and from your application's
    isolate storage

    The transfers may perform where the
    application is not running

    File can be downloaded from HTTP or HTTPS
    hosts

    The system maintains a queue of active
    transfers and services

    Application can query the state of active
    transfer
Background transfer policies

    There are a set of policies that control transfer
    behavior
       −   Maximum Upload file size: 5Mb
       −   Maximum Download file size over cellular: 20Mb
       −   Maximum Downloads file over WiFi: 100Mb

    These can be modified by setting the value of
    TransferPreferences on the particular transfer
Audio Playback Agent

    The audio can be streamed

    There are no ability to play music from library
    (only from application's isolate storage)
Conclusion

    Use background tasks to perform particular job

    DO NOT put any critical logic into yours app
    background agent

    There are a set of default backgrounds agent
    designed for common tasks
Questions

Más contenido relacionado

La actualidad más candente

La actualidad más candente (6)

SCEP 2012 inside SCCM 2012
SCEP 2012 inside SCCM 2012SCEP 2012 inside SCCM 2012
SCEP 2012 inside SCCM 2012
 
Computer Basic
Computer BasicComputer Basic
Computer Basic
 
Co m1-1
Co m1-1Co m1-1
Co m1-1
 
Smart Printing Technical Presentation
Smart Printing Technical PresentationSmart Printing Technical Presentation
Smart Printing Technical Presentation
 
Mobile Print from tablet or smartphone
Mobile Print from tablet or smartphoneMobile Print from tablet or smartphone
Mobile Print from tablet or smartphone
 
Opreating system
Opreating systemOpreating system
Opreating system
 

Destacado

01 introducing the windows phone 8.1
01   introducing the windows phone 8.101   introducing the windows phone 8.1
01 introducing the windows phone 8.1WindowsPhoneRocks
 
Windows Mobile Presentation
Windows Mobile PresentationWindows Mobile Presentation
Windows Mobile Presentationamsedky
 
RFID and its applications
RFID and its applicationsRFID and its applications
RFID and its applicationsNaveen Kumar
 
Rfid ppt 8th sem
Rfid ppt 8th semRfid ppt 8th sem
Rfid ppt 8th semAmit Ranjan
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedSlideShare
 

Destacado (9)

01 introducing the windows phone 8.1
01   introducing the windows phone 8.101   introducing the windows phone 8.1
01 introducing the windows phone 8.1
 
Windows mobile
Windows mobileWindows mobile
Windows mobile
 
Window Phone
Window PhoneWindow Phone
Window Phone
 
Windows Mobile Presentation
Windows Mobile PresentationWindows Mobile Presentation
Windows Mobile Presentation
 
Windows Phone PPT
Windows Phone PPTWindows Phone PPT
Windows Phone PPT
 
RFID and its applications
RFID and its applicationsRFID and its applications
RFID and its applications
 
Rfid ppt 8th sem
Rfid ppt 8th semRfid ppt 8th sem
Rfid ppt 8th sem
 
Windows Phone
Windows PhoneWindows Phone
Windows Phone
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
 

Similar a Windows Phone and mobile application development

AISEC 12 april 2012 WP 7.1.1
AISEC 12 april 2012  WP 7.1.1AISEC 12 april 2012  WP 7.1.1
AISEC 12 april 2012 WP 7.1.1Catalin Gheorghiu
 
Sinergija 11 WP7 Mango multitasking and “multitasking”
Sinergija 11   WP7 Mango multitasking and “multitasking”Sinergija 11   WP7 Mango multitasking and “multitasking”
Sinergija 11 WP7 Mango multitasking and “multitasking”Catalin Gheorghiu
 
What's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersWhat's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersGlen Gordon
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsOliver Scheer
 
follow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingfollow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingQIRIS
 
Stateful stream processing with Apache Flink
Stateful stream processing with Apache FlinkStateful stream processing with Apache Flink
Stateful stream processing with Apache FlinkKnoldus Inc.
 
Windows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 PreviewWindows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 PreviewPou Mason
 
ACCESS_WP_Hiker_App_framework-web
ACCESS_WP_Hiker_App_framework-webACCESS_WP_Hiker_App_framework-web
ACCESS_WP_Hiker_App_framework-webPaul Plaquette
 
Review 1 부분2
Review 1 부분2Review 1 부분2
Review 1 부분2희범 구
 
MobileApplicationTesting.pptx
MobileApplicationTesting.pptxMobileApplicationTesting.pptx
MobileApplicationTesting.pptxCbhaSlide
 
09 wp7 multitasking
09 wp7   multitasking09 wp7   multitasking
09 wp7 multitaskingTao Wang
 
Event oriented programming
Event oriented programmingEvent oriented programming
Event oriented programmingAshwini Awatare
 
Cool Stuff Your App Can Do
Cool Stuff Your App Can DoCool Stuff Your App Can Do
Cool Stuff Your App Can DoEd Donahue
 
Why Go Beyond Encryption
Why Go Beyond EncryptionWhy Go Beyond Encryption
Why Go Beyond Encryptionguest990c6c
 
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...darwinodb
 
EEEM048_Lecture5_Software platforms and services .pdf
EEEM048_Lecture5_Software platforms and services .pdfEEEM048_Lecture5_Software platforms and services .pdf
EEEM048_Lecture5_Software platforms and services .pdfssuser25ed54
 

Similar a Windows Phone and mobile application development (20)

AISEC 12 april 2012 WP 7.1.1
AISEC 12 april 2012  WP 7.1.1AISEC 12 april 2012  WP 7.1.1
AISEC 12 april 2012 WP 7.1.1
 
Sinergija 11 WP7 Mango multitasking and “multitasking”
Sinergija 11   WP7 Mango multitasking and “multitasking”Sinergija 11   WP7 Mango multitasking and “multitasking”
Sinergija 11 WP7 Mango multitasking and “multitasking”
 
What's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersWhat's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for Developers
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
 
follow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingfollow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switching
 
Stateful stream processing with Apache Flink
Stateful stream processing with Apache FlinkStateful stream processing with Apache Flink
Stateful stream processing with Apache Flink
 
unit 3.ppt
unit 3.pptunit 3.ppt
unit 3.ppt
 
Windows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 PreviewWindows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 Preview
 
ACCESS_WP_Hiker_App_framework-web
ACCESS_WP_Hiker_App_framework-webACCESS_WP_Hiker_App_framework-web
ACCESS_WP_Hiker_App_framework-web
 
Review 1 부분2
Review 1 부분2Review 1 부분2
Review 1 부분2
 
Android os
Android osAndroid os
Android os
 
Pocket pc
Pocket pcPocket pc
Pocket pc
 
MobileApplicationTesting.pptx
MobileApplicationTesting.pptxMobileApplicationTesting.pptx
MobileApplicationTesting.pptx
 
09 wp7 multitasking
09 wp7   multitasking09 wp7   multitasking
09 wp7 multitasking
 
Event oriented programming
Event oriented programmingEvent oriented programming
Event oriented programming
 
Ch03_Software.ppt
Ch03_Software.pptCh03_Software.ppt
Ch03_Software.ppt
 
Cool Stuff Your App Can Do
Cool Stuff Your App Can DoCool Stuff Your App Can Do
Cool Stuff Your App Can Do
 
Why Go Beyond Encryption
Why Go Beyond EncryptionWhy Go Beyond Encryption
Why Go Beyond Encryption
 
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
 
EEEM048_Lecture5_Software platforms and services .pdf
EEEM048_Lecture5_Software platforms and services .pdfEEEM048_Lecture5_Software platforms and services .pdf
EEEM048_Lecture5_Software platforms and services .pdf
 

Más de IT Booze

Erlang - concurrency-oriented programming by Serhiy Yvtyshenko
Erlang - concurrency-oriented programming by Serhiy YvtyshenkoErlang - concurrency-oriented programming by Serhiy Yvtyshenko
Erlang - concurrency-oriented programming by Serhiy YvtyshenkoIT Booze
 
Cloud Providers: Amazon, Rackspace, Azure by Andriy Tsok
Cloud Providers: Amazon, Rackspace, Azure by Andriy TsokCloud Providers: Amazon, Rackspace, Azure by Andriy Tsok
Cloud Providers: Amazon, Rackspace, Azure by Andriy TsokIT Booze
 
Let's teach your child programming with Greenfoot by Oleg Pashkevych
Let's teach your child programming with Greenfoot by Oleg Pashkevych Let's teach your child programming with Greenfoot by Oleg Pashkevych
Let's teach your child programming with Greenfoot by Oleg Pashkevych IT Booze
 
Overview of Google spreadsheet API for Java by Nazar Kostiv
Overview of Google spreadsheet API for Java by Nazar Kostiv Overview of Google spreadsheet API for Java by Nazar Kostiv
Overview of Google spreadsheet API for Java by Nazar Kostiv IT Booze
 
Microsoft Dynamics CRM Overview by Anatoly Kvasnikov
Microsoft Dynamics CRM Overview by Anatoly KvasnikovMicrosoft Dynamics CRM Overview by Anatoly Kvasnikov
Microsoft Dynamics CRM Overview by Anatoly KvasnikovIT Booze
 
Windows 8 and Metro design applications
Windows 8 and Metro design applicationsWindows 8 and Metro design applications
Windows 8 and Metro design applicationsIT Booze
 
Introduction to mercurial
Introduction to mercurialIntroduction to mercurial
Introduction to mercurialIT Booze
 

Más de IT Booze (9)

Erlang - concurrency-oriented programming by Serhiy Yvtyshenko
Erlang - concurrency-oriented programming by Serhiy YvtyshenkoErlang - concurrency-oriented programming by Serhiy Yvtyshenko
Erlang - concurrency-oriented programming by Serhiy Yvtyshenko
 
Cloud Providers: Amazon, Rackspace, Azure by Andriy Tsok
Cloud Providers: Amazon, Rackspace, Azure by Andriy TsokCloud Providers: Amazon, Rackspace, Azure by Andriy Tsok
Cloud Providers: Amazon, Rackspace, Azure by Andriy Tsok
 
Let's teach your child programming with Greenfoot by Oleg Pashkevych
Let's teach your child programming with Greenfoot by Oleg Pashkevych Let's teach your child programming with Greenfoot by Oleg Pashkevych
Let's teach your child programming with Greenfoot by Oleg Pashkevych
 
Overview of Google spreadsheet API for Java by Nazar Kostiv
Overview of Google spreadsheet API for Java by Nazar Kostiv Overview of Google spreadsheet API for Java by Nazar Kostiv
Overview of Google spreadsheet API for Java by Nazar Kostiv
 
Microsoft Dynamics CRM Overview by Anatoly Kvasnikov
Microsoft Dynamics CRM Overview by Anatoly KvasnikovMicrosoft Dynamics CRM Overview by Anatoly Kvasnikov
Microsoft Dynamics CRM Overview by Anatoly Kvasnikov
 
Windows 8 and Metro design applications
Windows 8 and Metro design applicationsWindows 8 and Metro design applications
Windows 8 and Metro design applications
 
Savana
SavanaSavana
Savana
 
Introduction to mercurial
Introduction to mercurialIntroduction to mercurial
Introduction to mercurial
 
Git
GitGit
Git
 

Último

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Último (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Windows Phone and mobile application development

  • 1. WINDOWS PHONE 7 MULTITASKING & BACKGROUND TASKS Rom an Ivasyshyn Softj ourn Inc.
  • 2. Topics  Platform overview  Multi-Tasking with background agents  Windows Phone Task Manager  Background Notifications  File Transfer Tasks, Music Playback Tasks
  • 3. Platform overview  Intelligent OS and well designed API  Powerful instrumentation and language  Up to date mobile OS  WP7 Marketplace now available for Ukraine  Multitasking  Push notifications  Implementation of social network API
  • 4. Foreground tasks  Normally a windows phone application runs in the foreground  At any given time one application is running in the foreground  This is to ensure the best performance and battery life for the phone user
  • 5. Background agents  Windows Phone application can start a background agent. − It is PeriodicTask, ResourceIntensiveTask or both at same time − There is only one agent allowed per application  The agent can run only when the main application is not in the foreground  Agent is not equivalent to foreground application running in the background − It's limited in what it can do and the access it has the processor and other phone facilities
  • 6. Background Agent restriction  The number of Agents allowed to be active at one time is restricted by the Windows Phone system  If the right conditions do not arise, Agent will not be started − The background agents only run in situations where the system feels able to give them access to the processor  If the phone goes into “Power Saver” mode it may stop running background agents completely  User can also manage the agents running on their phone and may chose to disable them  Don't put any critical logic into yours app background agent
  • 7. Agent and Tasks  A Task is the container that is managed by the operation system and runs at the appointed time  It runs an Agent which does the work − The agent code is called as a method in a class − The class is created as part of a Scheduled Task Agent Project  There are two kinds of Task − Periodic tasks that are runs through a certain period of time − Resource intensive tasks that run where the phone in a position to let them
  • 8. Periodic task agent  A periodic task agent runs every − Typically every 30 minutes or more, depends on phone loading  It is intended to perform a task that should be performed regularly and complete quickly − The agent is allowed to run for 25 seconds or less − The phone sets a limit on the maximum number of active at any time  Good for location tracking, polling background services etc.
  • 9. Resource intensive agents  Resource intensive agents run where the phone is in a position where it can usefully perform some data processing − Where the phone is powered by the main − Where the phone is connected to WiFi − Where the phone is not being used (locked screen displayed)  A “Resource Intensive” agent can run for up to 10 minutes
  • 10. Dual purpose agent  It is possible for application to perform both periodic and resource intensive tasks in the same time  This can be achieved using a single background agent class, run from both kind of task  The agent will run periodically and when phone is in a position to allow resource intensive work  When the agent starts it can determine the context in which it is running and then behave appropriate
  • 11. Background and Foreground communication  For Periodic and Resource-intensive Agents: − LINQ 2 SQL, file in isolated storage that is guarded with a Mutex. − Avoid IsolatedStorageSettings  For Audio Agents: Store custom data in the Tag property of the AudioTrack class.  Use methods NotifyConplete or Abort to set state flag  Toast and Tile notification
  • 13. File transfer tasks  It is also possible to create a background task to transfer files to and from your application's isolate storage  The transfers may perform where the application is not running  File can be downloaded from HTTP or HTTPS hosts  The system maintains a queue of active transfers and services  Application can query the state of active transfer
  • 14. Background transfer policies  There are a set of policies that control transfer behavior − Maximum Upload file size: 5Mb − Maximum Download file size over cellular: 20Mb − Maximum Downloads file over WiFi: 100Mb  These can be modified by setting the value of TransferPreferences on the particular transfer
  • 15. Audio Playback Agent  The audio can be streamed  There are no ability to play music from library (only from application's isolate storage)
  • 16. Conclusion  Use background tasks to perform particular job  DO NOT put any critical logic into yours app background agent  There are a set of default backgrounds agent designed for common tasks