Background task triggers ControlChannelTriggerIncoming VOIP callYes DeviceUseTriggerSync content with USB or Bluetooth deviceNo DeviceServicingTriggerUpdate.

Slides:



Advertisements
Similar presentations
Fall IM 2000 Evfolution of Presence Based Networks Evolution of Presence Based Networks Jonathan Rosenberg Chief Scientist.
Advertisements

IM May 23-25, 2000 Evolution of IP Based Presence Services Evolution of IP-Based Presence Services Jonathan Rosenberg Chief.
Windows Azure Himanshu Soni Senior Program Manager 2-041
Creating Windows Store Apps. 1. Overview of Windows Store applications 2. Worked example 3. Adding controls and event handlers Contents 2.
Windows 8 Tips & Tricks for XAML based Windows Store App Ronnie Saurenmann Microsoft
CS 4800 By Brandon Andrews.  Specifications  Goals  Applications  Design Steps  Testing.
Tony 684 User Data App Services Arun 765 Thomas 762 Shell Kernel Shawn 626 App Roberth 779 Enterprise John Ignite Store Barclay 695 Andrew 617 App Model.
Apps of the past Users of today ApplicationOn-PremisesApplication.
Cloud-powered apps Apps that fetch content from the web or peer devices Faster, More Capable Built using networking APIs in Windows Higher performance.
Advanced Windows 8 Apps Using JavaScript Jump Start Exam Prep Advanced Windows 8 Apps Using JavaScript Jeremy Foster Microsoft Developer Evangelist.
Web Proxy Server. Proxy Server Introduction Returns status and error messages. Handles http CGI requests. –For more information about CGI please refer.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College Lecture 8: WebForms — Web-based.
Name Title Microsoft Corporation Push Notification Introduction and Platform Interaction.
ONLINE CONFERENCE DESIGN.BUILD.DELIVE R with WINDOWS PHONE THURSDAY 24 MARCH 2011.
XML badge update schema
Developing Push Notifications (C2DM) for Android Vijai Co-Founder Adhish Technologies, Sweet’N’Spicy apps.
Using QuickSilver to mock-up Web 3.0 Krzys Ostrowski.
Google Cloud Messaging for Android (GCM) is a free service that helps developers send data from servers to their Android.
Windows Phone 8 uses Microsoft Push Notifications Windows 8/8.1 uses Windows Notification Service Windows Phone 8.1 uses Windows Notification.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT.
Windows Phone 8 Tips & Tricks for Developers Sascha Corti, Microsoft Switzerland Technical Evangelist | techpreacher.corti.com.
“Thanks guys for a great information packed day. head is spinning!” “Well done guys. Intense sessions” “This is the best ever JumpStart that I have.
App structure options Select feature levels to support D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,
Local, scheduled, periodic and push updates.
Windows 8 Tips & Tricks for XAML based Windows Store App Ronnie Saurenmann Microsoft
Basic State Plate App Logo Short Name Plate App Logo Short Name Semi-Live State Plate App Logo Short Name Badge Plate App Logo Short Name Badge Live.
The Windows Runtime (WinRT) is the shared runtime and API space used by store apps across the Windows platform (phone and client) 5 Common WinRT.
Grid Chemistry System Architecture Overview Akylbek Zhumabayev.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
DATA NOTIFICATIONS AUTH SERVER LOGIC LOGGING DIAGNOSTICS PLATFORMS: SCHEDULER SCALE.

1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
FCM Workflow using GCM.
Windows and Windows Phone Application Model Universal Apps What’s new in Windows Phone
Shell Interface Shell Interface Functions Data. Graphical Interface Graphical Interface Command-line Interface Command-line Interface Experiments Private.
Multitasking and Triggered Background Processing
Session 02 Module 3: Statements and Operators Module 4: Programming constructs Module 5: Arrays.
APLIKACIJE KOJE SU IZVAN SEBE Domagoj Pavlešić, dizzy.hr.
Windows 8: XAML or HTML? Karl Davies-Barrett CEE DPE Tech Lead, Microsoft 
Lecture 7: Media Player Topics: Media Player, Async prepare Date: Mar 3, 2016.
Vaughan Knight App Ecosystem Lead Microsoft FileOpenPicke r, FileSavePicker Read/Write access to SD card Appointments /Calendar API enhancements Appointments.
How to develop a VoIP softphone in C# that enables SIP Instant Messaging (IM) This presentation describes how to create a softphone in C# that allows you.
Windows Developer Day Fall Creators Update Chris Cortes
Lecture 7: Service Topics: Services, Playing Media.
Windows Phone 8.1 New Features
Viewbiquity HTML5 Tom Shafron Developer’s Blog CEO, Viewbiquity
volevi Windows Phone 8 SDK Update Puhn Chaturaphit
Lecture 7: Media Player Topics: Media Player, Async prepare
Lab 7 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show.
Customizing your device experience with assigned access
Android Programming Lecture 9
Microsoft Build /9/2018 8:05 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Agenda Tile basics Tile templates Adaptive templates Toast
Building Apps for Windows Phone 8.1 Jump Start
11/19/ | App Model & Storage © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /29/ :46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
12/2/2018 4:10 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
12/2/ :23 PM APP-410T Real time communication: keep your Metro style app connected whether it is running or suspended Raghu Gatta Principal Development.
12/5/2018 4:31 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Putting the I in IoT.
TechEd /9/2018 4:17 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Android Topics UI Thread and Limited processing resources
HNDIT2417 Mobile Application Development
Microsoft Build /18/ :04 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Emerging Platform#3 Android & Programming an App
Lecture 7: Service Topics: Services, Broadcast Receiver, Playing Media.
M3: Printing and PlayTo Jeremy Foster Michael Palermo
User Segmentation and Targeted Push Notifications for UWP apps
Yale Digital Conference 2019
Presentation transcript:

Background task triggers ControlChannelTriggerIncoming VOIP callYes DeviceUseTriggerSync content with USB or Bluetooth deviceNo DeviceServicingTriggerUpdate the firmware on USB deviceNo LocationTriggerCreate a geofence around a GPS locationYes MaintenanceTriggerPerform maintenance work on AC powerNo PushNotificationTriggerIncoming WNS push notification to initiate IM conversation Yes SystemTriggerRun code when the user or the Internet is present No* TimeTriggerPeriodically download POP3 every 15 minutes Yes

Background tasks architecture Time trigger service System events service Windows Push Notification Services Control channel service Location service Device service

Registering a background task private void RegisterBackgroundTasks() { BackgroundTaskBuilder builder = new BackgroundTaskBuilder(); // Friendly string name identifying the background task builder.Name = "Background Test Class"; // Class name builder.TaskEntryPoint = "BackgroundTaskLibrary.TestClass"; IBackgroundTrigger trigger = new TimeTrigger(15, true); builder.SetTrigger(trigger); IBackgroundCondition condition = new SystemCondition(SystemConditionType.InternetAvailable); builder.AddCondition(condition); IBackgroundTaskRegistration task = builder.Register(); task.Progress += new BackgroundTaskProgressEventHandler(task_Progress); task.Completed += new BackgroundTaskCompletedEventHandler(task_Completed); }

Background task run implementation namespace BackgroundTaskLibrary { public sealed class TestClass:IBackgroundTask { private int globalcount; void IBackgroundTask.Run(IBackgroundTaskInstance taskInstance) { globalcount = 0; taskInstance.Canceled += new BackgroundTaskCanceledEventHandler(OnCanceled); for (int i = 0; i < ; ++i) { Interlocked.Increment(ref globalcount); taskInstance.Progress = (uint)globalcount; }

Common gotchas 1.Output type of class library is not Windows Runtime Component 2.Background task EntryPoint is not accurately described in the manifest a)E.g. JS tasks in a sub-directory need to escape the directory separator ‘\’ in their registration 3.Forgetting to call close() in JavaScript – now a WACK failure 4.App not on the lock screen and hence background task is not triggered 5.Not using Visual Studio to trigger and test your background task

public sealed class TestClass:IBackgroundTask { CancellationTokenSource cancelTokenSource = new CancellationTokenSource(); async void Run(IBackgroundTaskInstance taskInstance) { BackgroundTaskDeferral deferral = taskInstance.GetDeferral(); HostName server = new HostName("contoso.com"); StreamSocket sock = new StreamSocket(); // skipping other extraneous code taskInstance.Canceled += new BackgroundTaskCanceledEventHandler(OnCanceled); try { await sock.ConnectAsync(server, "http").AsTask(cancelTokenSource.Token); await sock.InputStream.ReadAsync(…).AsTask(cancelTokenSource.Token); } finally { deferral.Complete(); } } private void OnCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason) { cancelTokenSource.Cancel(); } System sends a cancelation, cancel all work and return immediately from the background task Idle task cancelation

Lock screen app15 minutes2 CPU seconds0.469 MB4.69 MB Non lock screen app 2 hours1 CPU second0.625MB6.25 MB