-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows 10 build 14295 - May 2016 Update
- Loading branch information
Showing
307 changed files
with
14,902 additions
and
3,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,8 @@ ipch/ | |
*.opensdf | ||
*.sdf | ||
*.cachefile | ||
*.VC.db | ||
*.VC.VC.opendb | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<!--- | ||
category: LaunchingAndBackgroundTasks | ||
samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=798686 | ||
---> | ||
|
||
# Background activation sample | ||
|
||
This sample shows you how to create and register background tasks that will run in the main process using the Windows Runtime background task API. | ||
|
||
**Note** This Universal Windows app sample requires Visual Studio 2015 to build and Windows 10 Anniversay Update to execute. | ||
|
||
A background task is triggered by a system or time event and can be constrained by one or more conditions. When a background task is triggered, OnBackgroundActivated is invoked and performs the work of the background task. A background task can run even when the app that registered the background task is suspended or not running. | ||
|
||
This sample demonstrates the following: | ||
|
||
- Creating and registering background tasks for the Single Process Model written in C++, C\#, or Visual Basic. | ||
- Creating a background task that is triggered by a system event. | ||
- Requesting access to run in the background. | ||
- Creating a background task that is triggered by a time trigger. | ||
- Adding a condition that constrains the background task to run only when the condition is in effect. | ||
- Creating and signaling an application trigger. | ||
- Reporting background task progress and completion to the app. | ||
- Using a deferral object to include asynchronous code in your background task. | ||
- Handling the cancellation of a background task, and ensuring the task is cancelled when required conditions are no longer met. | ||
- Initializing background task progress and completion handlers when the app is launched. | ||
|
||
This sample uses the Single Process Model method for background activity. Applications can also use the Multiple Process Model method for running Background Tasks in a separate process from the foreground application. | ||
|
||
## Related topics | ||
|
||
### Samples | ||
|
||
[Background Tasks](/Samples/BackgroundTasks) | ||
|
||
### Reference | ||
|
||
[Launching, resuming, and multitasking](http://msdn.microsoft.com/library/windows/apps/hh770837) | ||
|
||
[Managing background tasks](http://msdn.microsoft.com/library/windows/apps/hh977053) | ||
|
||
[Support your app with background tasks](https://msdn.microsoft.com/library/windows/apps/mt299103) | ||
|
||
**API reference** | ||
|
||
[**Windows.ApplicationModel.Background (XAML)**](http://msdn.microsoft.com/library/windows/apps/br224847) | ||
|
||
[**Windows.UI.WebUI.WebUIBackgroundTaskInstance (HTML)**](http://msdn.microsoft.com/library/windows/apps/hh701740) | ||
|
||
### Related technologies | ||
|
||
[**Windows.ApplicationModel.Background**](http://msdn.microsoft.com/library/windows/apps/br224847) | ||
|
||
## Operating system requirements | ||
|
||
Client | ||
|
||
Windows 10 Anniversary Update | ||
|
||
Server | ||
|
||
None supported | ||
|
||
Phone | ||
|
||
Windows Phone 10 Anniversary Update | ||
|
||
## Build the sample | ||
|
||
1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build. | ||
2. Start Microsoft Visual Studio 2015 and select **File** \> **Open** \> **Project/Solution**. | ||
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio 2015 Solution (.sln) file. | ||
4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**. | ||
|
||
## Run the sample | ||
|
||
**Deploying the sample** | ||
|
||
1. Select **Build** \> **Deploy Solution**. | ||
|
||
**Deploying and running the sample** | ||
|
||
1. To debug the sample and then run it, press F5 or select **Debug** \> **Start Debugging**. To run the sample without debugging, press Ctrl+F5 or select**Debug** \> **Start Without Debugging**. | ||
|
||
**Triggering background tasks** | ||
|
||
To trigger the background tasks associated with the `TimeZoneChange` event: | ||
|
||
1. Change date and time settings. | ||
2. Click **Change time zone...** | ||
3. Select a time zone that has a UTC offset different from the currently selected time zone. | ||
4. Click **OK**. | ||
|
||
**Note** The minimum delay for creating TimeTrigger events is 15 minutes. The first timer event, however, might not occur until 15 minutes after it is expected to expire (30 minutes after the app registers the event). | ||
|
||
## Read more | ||
|
||
See the following topics for step-by-step information about using background tasks: | ||
|
||
- [Create and register a background task](https://msdn.microsoft.com/library/windows/apps/mt299100) | ||
- [Respond to system events with background tasks](https://msdn.microsoft.com/library/windows/apps/mt185414) | ||
- [Set conditions for running a background task](https://msdn.microsoft.com/library/windows/apps/mt185620) | ||
- [Handle a cancelled background task](https://msdn.microsoft.com/library/windows/apps/mt187312) | ||
- [Monitor background task progress and completion](https://msdn.microsoft.com/library/windows/apps/mt186457) | ||
- [Run a background task on a timer ](https://msdn.microsoft.com/library/windows/apps/mt186458) | ||
- [Use a maintenance trigger](https://msdn.microsoft.com/library/windows/apps/mt185632) | ||
- [Declare background tasks in the application manifest](https://msdn.microsoft.com/library/windows/apps/mt185412) | ||
- [Guidelines for background tasks](https://msdn.microsoft.com/library/windows/apps/mt187310) | ||
- [Debug a background task](https://msdn.microsoft.com/library/windows/apps/mt299101) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25123.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BackgroundActivation", "BackgroundActivation.vcxproj", "{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|ARM = Debug|ARM | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|ARM = Release|ARM | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|ARM.ActiveCfg = Debug|ARM | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|ARM.Build.0 = Debug|ARM | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|ARM.Deploy.0 = Debug|ARM | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|x64.ActiveCfg = Debug|x64 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|x64.Build.0 = Debug|x64 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|x64.Deploy.0 = Debug|x64 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|x86.ActiveCfg = Debug|Win32 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|x86.Build.0 = Debug|Win32 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Debug|x86.Deploy.0 = Debug|Win32 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|ARM.ActiveCfg = Release|ARM | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|ARM.Build.0 = Release|ARM | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|ARM.Deploy.0 = Release|ARM | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|x64.ActiveCfg = Release|x64 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|x64.Build.0 = Release|x64 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|x64.Deploy.0 = Release|x64 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|x86.ActiveCfg = Release|Win32 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|x86.Build.0 = Release|Win32 | ||
{F710B9FD-4E6B-42D7-A99A-6D48888D48B0}.Release|x86.Deploy.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.