TechEd 2013 11/29/2018 12:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.

Slides:



Advertisements
Similar presentations
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Advertisements

Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
demo Demo.
Wireless Communication and Networks
6/5/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
WebView: Bringing the web to your app
TechEd /26/2018 3:42 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Build /4/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
8/8/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /8/ :20 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
9/18/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
9/18/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
9/22/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Microsoft Build /9/2018 8:05 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Windows Phone multitasking
TechEd /14/2018 6:05 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Building Apps for Windows Phone 8.1 Jump Start
TechEd /14/2018 6:26 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
0 to 60: Developing Apps for Microsoft Office 2013
11/19/ | App Model & Storage © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
11/21/2018 4:57 AM SIA303 Advanced Persistent Threats (APT): Understanding the New Era of Attacks! Marcus Murray Security Team Manager, Microsoft MVP –
TechEd /21/2018 5:20 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
11/22/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /23/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /24/2018 6:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /24/2018 5:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Jason Zander Unplugged
Visual Studio 2013 for web developers
Identity Infrastructure Fundamentals and Key Capabilities
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.
TechEd /2/2018 5:42 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /6/2018 8:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /9/2018 4:17 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /28/ :27 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :21 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :54 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows Phone: Developer Best Practices and How to Maximize Performance
TechEd /18/ :08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /18/ :01 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /18/2019 2:43 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Tech·Ed North America /18/2019 4:15 PM
Integrating with Windows 8 Experiences
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Top OS Deployment Issues With Answers from Experts
TechEd /23/2019 7:16 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /27/ :51 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Pushing Data to and from the Cloud with SQL Azure Data Sync
Using Windows Runtime and SDK to build Metro style apps
2/28/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /4/2019 3:19 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Build /10/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /7/2019 1:14 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
TechEd /11/ :25 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /28/2019 7:58 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
2010 Microsoft BI Conference
Hack-proofing your Clients using Windows 7 Security!
TechEd /27/2019 5:37 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Code First Development in Microsoft ADO.NET Entity Framework 4.1
TechEd /5/2019 4:36 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Building BI applications using PowerPivot for Excel
6/5/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
7/5/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /18/ :51 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /30/2019 7:18 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /5/2019 2:08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /21/2019 9:49 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Presentation transcript:

TechEd 2013 11/29/2018 12:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Under the Hood of WinRT Background APIs 11/29/2018 12:46 PM DEV-B403 Under the Hood of WinRT Background APIs Tony Champion © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda Why do we need background APIs? Explore the available APIs Goal: To understand the available background APIs and how they affect your Windows Store apps.

Why Background APIs? 11/29/2018 12:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

App Life Cycle

Windows Store app Life Cycle Running App Suspending Terminated App Suspended App Low Resources Resuming

What type of apps does this affect?

What about LOB apps Real time communications Large data transfers Periodic updates

Connecting with Device

User logs on Internet is available Time zone changes changes

Background APIs

Playing Audio and Video 11/29/2018 12:46 PM Playing Audio and Video © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Audio and Video <audio/> <MediaElement/> <video/> XAML HTML <audio/> <video/> <MediaElement/>

3 Requirements

BackgroundCapableMedia Audio Category Two types support background audio categories BackgroundCapableMedia Communications Local media playback Streaming playlist Streaming radio Music videos Movies and more… Voice over IP (VoIP) Real-time chat

Set Audio Category HTML audtag.setAttribute("msAudioCategory", "backgroundcapablemedia"); C# media.AudioCategory = AudioCategory.Communications;

Register for Transport Controls Play / Pause Sound Level Next / Previous Track Audio Information

Register for Transport Controls MediaControl.PlayPauseTogglePressed += PlayPause; MediaControl.PlayPressed += PlayPressed; MediaControl.PausePressed += PausePressed; MediaControl.StopPressed += StopPressed;

Background Audio Tony Champion

Transferring Data 11/29/2018 12:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

BackgroundTransfer APIs Upload and download files outside of your app Runs when app is suspended or terminated App receives notifications when app is restarted Supports multiple protocols Protocol Upload Download HTTP HTTPS FTP

Basic server credentials Secure transfers Supports multiple authentication schemes Basic server credentials Proxy credentials Cookies Custom HTTP headers

Network and Power Aware Designed for power efficiency Handles network status changes and glitches Auto recovery Uses Cost Policy to determine connection Can prevent from transferring data on metered network

Transferring Files Progress Background Downloader Download Operation Control Start Pause Resume

Creating a Background Transfer 11/29/2018 12:46 PM Creating a Background Transfer private async void DownloadFile( Uri source, StorageFile destinationFile) { var downloader = new BackgroundDownloader(); var dl = downloader.CreateDownload(source, destinationFile); await dl.StartAsync(); } © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Reconnecting to Downloads BackgroundDownloader.GetCurrentDownloadsAsync Returns a collection of DownloadOperations Can attach to progress events with AttachAsync

Background Transfers Tony Champion

Background Tasks 11/29/2018 12:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Background Tasks Execute code outside of your app in response to a system event Will execute even if your app is suspended or terminated Used for executing small amounts of code that required limited resources

Lock Screen Benefits Apps on the lock screen are given more benefits Can run longer Access to more network resources Can be triggered more frequently More event opportunities

Adding to Lock Screen BackgroundExecutionManager.RequestAccessAsync Can only set it once per app

Resource Quotas System resource quotas are enforced on background tasks CPU usage quota Refresh time App not on lock screen 1 sec 2 hrs App on lock screen 2 secs 15 min

Network Quotas Network quotas when on battery power Based on 1 Mbps of throughput All quotas are suspended when app is running Refresh Time 15 min 2 hr Daily App not on lock screen n/a 0.625 MB 7.5 MB App on lock screen 0.469 MB 3.75 MB 45 MB

Trigger Each background task has a single trigger Control Channel Push Notification Maintenance Timer System Event Some triggers require app to be on lock screen

Conditions Background tasks can have one or more conditions Prevents task from running unnecessarily Internet Available / Unavailable Session Connected / Disconnected User Present / Not Present

Prepping your Solution

Defining Tasks

Creating Background Task Class public sealed class MyClass : IBackgroundTask { public void Run(IBackgroundTaskInstance task) // Insert background code } Windows.ApplicationModel.Background

Deferral for Async Operations public void Run(IBackgroundTaskInstance taskInstance) { BackgroundTaskDeferral deferral = taskInstance.GetDeferral(); // do some async work deferral.Complete(); }

Registering a Background Task var builder = new BackgroundTaskBuilder(); builder.Name = “MyRegisteredTask"; builder.TaskEntryPoint = "Tasks.MyBackgroundTask"; builder.Register();

Accessing Registered Tasks foreach (var task in BackgroundTaskRegistration.AllTasks) { task.Value.Unregister(true); }

Background Task Basics Tony Champion

Triggers

Control Channel Maintain long running network connection Minimize network and resource usage Not supported in JavaScript Push Notification Keep Alive

Push Notification ** Not the same a Windows Notification Services ** Provides way to process incoming network packets Can be configured to run in a low power, connected stand-by state

Server Keep Alive Wakes up app on regular interval to send data to server Avoids time-outs due to inactivity Intervals set between 15 minutes and 24 hours

Network Keep Alive Used for network intermediaries: proxies and IP translators Time period is auto calculated by Windows Can request interval to be shorter if still experiencing dropped connections

Push Notification Receives raw data from Windows Notification Services Not required for toasts or tiles Limited to 5k messages Not for confidential information App must be in the Windows Store

Use Cases for Push Notification Notification that an action is required Email is available Incoming communication message Notify client that it needs to sync data

Time and Maintenance Time based recurring triggers Can be set to a minimum of 15 minute intervals TimeTrigger MaintenanceTrigger Must be on lock screen to run Device must be plugged into AC power to run

System Event Fires based on the system event that is it assigned to SmsReceived SessionConnected UserPresent ServicingComplete UserAway LockScreenApplicationAdded NetworkStateChange LockScreenApplicationRemoved ControlChannelReset TimeZoneChange InternetAvailable OnlineIdConnectedStateChange

System Event Demo Tony Champion

Debugging

Matching Names 1 2 3

Manual Trigger Does not support: ControlChannel, PushNotification, and SystemEvent.SmsReceived

Event Viewer

Enabling Diagnostic Log 1 2

Wrap Up

Things to Remember Be considerate of system resources Does your app need background APIs? Is there a different approach? Be aware of resource constraints Plan for the lock screen

Resources Learning TechNet msdn http://channel9.msdn.com/Events/TechEd 11/29/2018 12:46 PM Resources Learning Sessions on Demand http://channel9.msdn.com/Events/TechEd Microsoft Certification & Training Resources www.microsoft.com/learning TechNet msdn Resources for IT Professionals http://microsoft.com/technet Resources for Developers http://microsoft.com/msdn © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Complete an evaluation on CommNet and enter to win! 11/29/2018 12:46 PM Complete an evaluation on CommNet and enter to win! © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11/29/2018 12:46 PM Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11/29/2018 12:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.