From 17ab5a17cec10f3be56d7760035c80e616f40d8c Mon Sep 17 00:00:00 2001 From: Raymond Chen Date: Wed, 16 Dec 2015 17:55:50 -0800 Subject: [PATCH] Windows 10 1511 Release - December 2015 --- README.md | 143 ++--- .../MyBackgroundAudioTask.cs | 12 +- Samples/CallerID/README.md | 56 ++ Samples/CallerID/cs/CallerID.csproj | 195 +++++++ Samples/CallerID/cs/CallerID.sln | 54 ++ Samples/CallerID/cs/Package.appxmanifest | 51 ++ Samples/CallerID/cs/SampleConfiguration.cs | 50 ++ Samples/CallerID/cs/Scenario1_Register.xaml | 36 ++ .../CallerID/cs/Scenario1_Register.xaml.cs | 93 ++++ Samples/CallerID/cs/Scenario2_SetDefault.xaml | 44 ++ .../CallerID/cs/Scenario2_SetDefault.xaml.cs | 58 ++ .../cs/Tasks/CallerIDBackgroundTask.cs | 63 +++ Samples/CallerID/cs/Tasks/Tasks.csproj | 121 +++++ Samples/CallerID/cs/Tasks/project.json | 16 + Samples/CallerID/cs/project.json | 16 + Samples/LockScreenApps/cs/ScenarioInput1.xaml | 34 +- .../LockScreenApps/cs/ScenarioInput1.xaml.cs | 63 +-- Samples/LockScreenApps/cs/ScenarioList.xaml | 2 +- .../LockScreenApps/cs/ScenarioOutput1.xaml | 5 - Samples/MIDI/README.md | 4 +- Samples/MIDI/cs/MIDI.csproj | 13 +- Samples/MIDI/cs/Styles/Styles.xaml | 507 ------------------ Samples/MicrosoftPassport/README.md | 101 ++++ .../Server/App_Start/FilterConfig.cs | 13 + .../Server/App_Start/RouteConfig.cs | 19 + .../Server/App_Start/WebApiConfig.cs | 20 + .../Controllers/AuthenticationController.cs | 120 +++++ .../Server/Controllers/HomeController.cs | 29 + Samples/MicrosoftPassport/Server/Data/DAL.cs | 81 +++ Samples/MicrosoftPassport/Server/Global.asax | 1 + .../MicrosoftPassport/Server/Global.asax.cs | 33 ++ .../Server/MicrosoftPassport.Server.csproj | 182 +++++++ .../Server/MicrosoftPassport.Server.sln | 40 ++ .../Server/Models/Messages.cs | 38 ++ .../Server/Models/SubjectPublicKeyInfo.cs | 212 ++++++++ .../Server/Properties/AssemblyInfo.cs | 35 ++ .../Server/Scripts/_references.js | Bin 0 -> 68 bytes .../Server/Views/Home/Index.cshtml | 8 + .../Server/Views/Shared/Error.cshtml | 13 + .../Server/Views/Shared/_Layout.cshtml | 23 + .../MicrosoftPassport/Server/Views/Web.config | 43 ++ .../Server/Views/_ViewStart.cshtml | 3 + .../MicrosoftPassport/Server/Web.Debug.config | 30 ++ .../Server/Web.Release.config | 31 ++ Samples/MicrosoftPassport/Server/Web.config | 57 ++ .../MicrosoftPassport/Server/packages.config | 13 + .../cs/AccountOverviewPage.xaml | 43 ++ .../cs/AccountOverviewPage.xaml.cs | 35 ++ Samples/MicrosoftPassport/cs/App.xaml | 51 ++ .../MicrosoftPassport/cs/EnableHelloPage.xaml | 65 +++ .../cs/EnableHelloPage.xaml.cs | 156 ++++++ Samples/MicrosoftPassport/cs/MainPage.xaml | 67 +++ Samples/MicrosoftPassport/cs/MainPage.xaml.cs | 201 +++++++ .../cs/MicrosoftPassport.csproj | 163 ++++++ .../cs/MicrosoftPassport.sln | 46 ++ .../MicrosoftPassport/cs/Package.appxmanifest | 31 ++ Samples/MicrosoftPassport/cs/Util.cs | 102 ++++ Samples/MicrosoftPassport/cs/project.json | 16 + Samples/Store/README.md | 16 +- Samples/Store/cpp/SampleConfiguration.cpp | 3 +- Samples/Store/cpp/Scenario9_B2B.xaml.cpp | 175 ++++++ Samples/Store/cpp/Scenario9_B2B.xaml.h | 38 ++ Samples/Store/cpp/Store.vcxproj | 11 +- Samples/Store/cpp/Store.vcxproj.filters | 5 +- Samples/Store/cs/SampleConfiguration.cs | 3 +- Samples/Store/cs/Scenario9_B2B.xaml.cs | 133 +++++ Samples/Store/cs/Store.csproj | 12 +- Samples/Store/js/Package.appxmanifest | 4 + Samples/Store/js/Store.jsproj | 2 + Samples/Store/js/html/scenario9-b2b.html | 38 ++ Samples/Store/js/js/sample-configuration.js | 1 + Samples/Store/js/js/scenario9-b2b.js | 94 ++++ Samples/Store/shared/Scenario9_B2B.xaml | 34 ++ SharedContent/js/css/default.css | 5 + 74 files changed, 3636 insertions(+), 695 deletions(-) create mode 100644 Samples/CallerID/README.md create mode 100644 Samples/CallerID/cs/CallerID.csproj create mode 100644 Samples/CallerID/cs/CallerID.sln create mode 100644 Samples/CallerID/cs/Package.appxmanifest create mode 100644 Samples/CallerID/cs/SampleConfiguration.cs create mode 100644 Samples/CallerID/cs/Scenario1_Register.xaml create mode 100644 Samples/CallerID/cs/Scenario1_Register.xaml.cs create mode 100644 Samples/CallerID/cs/Scenario2_SetDefault.xaml create mode 100644 Samples/CallerID/cs/Scenario2_SetDefault.xaml.cs create mode 100644 Samples/CallerID/cs/Tasks/CallerIDBackgroundTask.cs create mode 100644 Samples/CallerID/cs/Tasks/Tasks.csproj create mode 100644 Samples/CallerID/cs/Tasks/project.json create mode 100644 Samples/CallerID/cs/project.json delete mode 100644 Samples/MIDI/cs/Styles/Styles.xaml create mode 100644 Samples/MicrosoftPassport/README.md create mode 100644 Samples/MicrosoftPassport/Server/App_Start/FilterConfig.cs create mode 100644 Samples/MicrosoftPassport/Server/App_Start/RouteConfig.cs create mode 100644 Samples/MicrosoftPassport/Server/App_Start/WebApiConfig.cs create mode 100644 Samples/MicrosoftPassport/Server/Controllers/AuthenticationController.cs create mode 100644 Samples/MicrosoftPassport/Server/Controllers/HomeController.cs create mode 100644 Samples/MicrosoftPassport/Server/Data/DAL.cs create mode 100644 Samples/MicrosoftPassport/Server/Global.asax create mode 100644 Samples/MicrosoftPassport/Server/Global.asax.cs create mode 100644 Samples/MicrosoftPassport/Server/MicrosoftPassport.Server.csproj create mode 100644 Samples/MicrosoftPassport/Server/MicrosoftPassport.Server.sln create mode 100644 Samples/MicrosoftPassport/Server/Models/Messages.cs create mode 100644 Samples/MicrosoftPassport/Server/Models/SubjectPublicKeyInfo.cs create mode 100644 Samples/MicrosoftPassport/Server/Properties/AssemblyInfo.cs create mode 100644 Samples/MicrosoftPassport/Server/Scripts/_references.js create mode 100644 Samples/MicrosoftPassport/Server/Views/Home/Index.cshtml create mode 100644 Samples/MicrosoftPassport/Server/Views/Shared/Error.cshtml create mode 100644 Samples/MicrosoftPassport/Server/Views/Shared/_Layout.cshtml create mode 100644 Samples/MicrosoftPassport/Server/Views/Web.config create mode 100644 Samples/MicrosoftPassport/Server/Views/_ViewStart.cshtml create mode 100644 Samples/MicrosoftPassport/Server/Web.Debug.config create mode 100644 Samples/MicrosoftPassport/Server/Web.Release.config create mode 100644 Samples/MicrosoftPassport/Server/Web.config create mode 100644 Samples/MicrosoftPassport/Server/packages.config create mode 100644 Samples/MicrosoftPassport/cs/AccountOverviewPage.xaml create mode 100644 Samples/MicrosoftPassport/cs/AccountOverviewPage.xaml.cs create mode 100644 Samples/MicrosoftPassport/cs/App.xaml create mode 100644 Samples/MicrosoftPassport/cs/EnableHelloPage.xaml create mode 100644 Samples/MicrosoftPassport/cs/EnableHelloPage.xaml.cs create mode 100644 Samples/MicrosoftPassport/cs/MainPage.xaml create mode 100644 Samples/MicrosoftPassport/cs/MainPage.xaml.cs create mode 100644 Samples/MicrosoftPassport/cs/MicrosoftPassport.csproj create mode 100644 Samples/MicrosoftPassport/cs/MicrosoftPassport.sln create mode 100644 Samples/MicrosoftPassport/cs/Package.appxmanifest create mode 100644 Samples/MicrosoftPassport/cs/Util.cs create mode 100644 Samples/MicrosoftPassport/cs/project.json create mode 100644 Samples/Store/cpp/Scenario9_B2B.xaml.cpp create mode 100644 Samples/Store/cpp/Scenario9_B2B.xaml.h create mode 100644 Samples/Store/cs/Scenario9_B2B.xaml.cs create mode 100644 Samples/Store/js/html/scenario9-b2b.html create mode 100644 Samples/Store/js/js/scenario9-b2b.js create mode 100644 Samples/Store/shared/Scenario9_B2B.xaml diff --git a/README.md b/README.md index f62c73588b..9086ab3627 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Universal Windows app samples @@ -43,20 +43,19 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github. ## Samples by category +### App settings + - - -
App settings
App package information Application data Store
+ +### Audio, video, and camera + - - - @@ -106,25 +105,28 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Audio, video, and camera
Adaptive streaming Advanced castingWindows media import
+ +### Communications + - - - + - + + +
Communications
Bluetooth RFCOMM chatCaller ID Communication blocking and filteringPhone call
Phone call Real-time communication SMS send and receive
Voice over IP (VoIP)
+ +### Contacts and calendar + - - - @@ -134,10 +136,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Contacts and calendar
Appointment calendar Contact cardsUserDataAccountManager
+ +### Controls, layout, and text + - - - @@ -192,10 +194,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Controls, layout, and text
AutoSuggestBox migration ClipboardWindow resizing
+ +### Custom user interactions + - - - @@ -210,10 +212,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Custom user interactions
Basic input Complex inkingTouch keyboard text input
+ +### Data + - - - @@ -235,10 +237,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Data
Blobs CompressionXmlLite
+ +### Deep links and app-to-app communication + - - - @@ -248,10 +250,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Deep links and app-to-app communication
App services Jump list customizationSharing content target app
+ +### Devices and sensors + - - - @@ -311,10 +313,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Devices and sensors
Accelerometer Activity detection sensorSimple orientation sensor
+ +### Files, folders, and libraries + - - - @@ -331,19 +333,19 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Files, folders, and libraries
File access File and folder thumbnailSemantic text query
+ +### Gaming + - - -
Gaming
Direct3D game DirectX and XAML game
+ +### Globalization and localization + - - - @@ -364,10 +366,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Globalization and localization
Application resources and localization CalendarUnicode string processing
+ +### Graphics and animation + - - - @@ -384,10 +386,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Graphics and animation
Animated GIF playback (XAML) Animation library (HTML)Transform3D parallax
+ +### Identity, security, and encryption + - - - @@ -400,38 +402,41 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github. + - + + +
Identity, security, and encryption
Credential locker Credential picker
Lock screen personalizationMicrosoft Passport and Windows Hello Smart cardsUser information
User information UserConsentVerifier Web account management
WebAuthenticationBroker
+ +### Launching and background tasks + - - -
Launching and background tasks
Association launching Background task
+ +### Maps and location + - - -
Maps and location
Geolocation Geotag MapControl
+ +### Navigation + - - - @@ -443,10 +448,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Navigation
Back Button Master/detailXHR, handling navigation errors, and URL schemes
+ +### Networking and web services + - - - @@ -476,37 +481,37 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
Networking and web services
Background transfer DatagramSocketWi-Fi scanning
+ +### Platform architecture + - - -
Platform architecture
In-process component authoring In-process component authoring Out-of-process component authoring
+ +### Speech and Cortana + - - -
Speech and Cortana
Cortana voice command Speech recognition and synthesis
+ +### Threading + - - -
Threading
JavaScript Web Workers app multithreading
+ +### Tiles, toasts, and notifications + - - - diff --git a/Samples/BackgroundAudio/cs/BackgroundAudioTask/MyBackgroundAudioTask.cs b/Samples/BackgroundAudio/cs/BackgroundAudioTask/MyBackgroundAudioTask.cs index 484a785114..12cc7634db 100644 --- a/Samples/BackgroundAudio/cs/BackgroundAudioTask/MyBackgroundAudioTask.cs +++ b/Samples/BackgroundAudio/cs/BackgroundAudioTask/MyBackgroundAudioTask.cs @@ -218,7 +218,7 @@ private void UpdateUVCOnNewTrack(MediaPlaybackItem item) /// void smtc_PropertyChanged(SystemMediaTransportControls sender, SystemMediaTransportControlsPropertyChangedEventArgs args) { - // TODO: If soundlevel turns to muted, app can choose to pause the music + // If soundlevel turns to muted, app can choose to pause the music } /// @@ -382,9 +382,6 @@ private void SkipToPrevious() { smtc.PlaybackStatus = MediaPlaybackStatus.Changing; playbackList.MovePrevious(); - - // TODO: Work around playlist bug that doesn't continue playing after a switch; remove later - BackgroundMediaPlayer.Current.Play(); } /// @@ -394,10 +391,6 @@ private void SkipToNext() { smtc.PlaybackStatus = MediaPlaybackStatus.Changing; playbackList.MoveNext(); - - // TODO: Work around playlist bug that doesn't continue playing after a switch; remove later - BackgroundMediaPlayer.Current.Play(); - } #endregion @@ -477,9 +470,6 @@ void BackgroundMediaPlayer_MessageReceivedFromForeground(object sender, MediaPla Debug.WriteLine("Skipping to track " + index); smtc.PlaybackStatus = MediaPlaybackStatus.Changing; playbackList.MoveTo((uint)index); - - // TODO: Work around playlist bug that doesn't continue playing after a switch; remove later - BackgroundMediaPlayer.Current.Play(); return; } diff --git a/Samples/CallerID/README.md b/Samples/CallerID/README.md new file mode 100644 index 0000000000..6d851f82b7 --- /dev/null +++ b/Samples/CallerID/README.md @@ -0,0 +1,56 @@ + + +# Caller ID sample + +This sample shows how to set Call Origin information for an unrecognized incoming call. + +Specifically, this sample shows how to: +- Register a Caller ID background task to be triggered when an unrecognized incoming call arrives. + The task sets the call location, category, category description, and display name of the call. +- Display the system UI to let the user choose the active Caller ID app. +- Determine whether the app is the the active Caller ID app. + +See the Package.appxmanifest file for the extensions and capabilities a Caller ID app must declare. + +**Note** The Windows universal samples require Visual Studio 2015 to build and Windows 10 to execute. + +To obtain information about Windows 10 development, go to the [Windows Dev Center](https://dev.windows.com) + +To obtain information about Microsoft Visual Studio 2015 and the tools for developing Windows apps, go to [Visual Studio 2015](http://go.microsoft.com/fwlink/?LinkID=532422) + +### Reference + +[Windows.ApplicationModel.Calls.Provider namespace](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.calls.provider.aspx) + +[PhoneCallOriginManager class](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.calls.provider.phonecalloriginmanager.aspx) + +[PhoneCallOrigin class](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.calls.provider.phonecallorigin.aspx) + +## System requirements + +**Client:** Not Supported + +**Server:** Not Supported + +**Phone:** Windows 10 + +## 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 + +The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it. + +### Deploying the sample + +- Select Build > Deploy Solution. + +### Deploying and running the sample + +- 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 selectDebug > Start Without Debugging. diff --git a/Samples/CallerID/cs/CallerID.csproj b/Samples/CallerID/cs/CallerID.csproj new file mode 100644 index 0000000000..6b8ce02a89 --- /dev/null +++ b/Samples/CallerID/cs/CallerID.csproj @@ -0,0 +1,195 @@ + + + + + Debug + x86 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F} + AppContainerExe + Properties + SDKTemplate + CallerID + en-US + UAP + 10.0.10586.0 + 10.0.10586.0 + 14 + true + true + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UAP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + + + + + App.xaml.cs + App.xaml + + + MainPage.xaml.cs + MainPage.xaml + + + Properties\AssemblyInfo.cs + + + + Scenario2_SetDefault.xaml + + + Scenario1_Register.xaml + + + + + Designer + + + + + App.xaml + MSBuild:Compile + Designer + + + MainPage.xaml + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Styles\Styles.xaml + MSBuild:Compile + Designer + + + + + Properties\Default.rd.xml + + + Assets\microsoft-sdk.png + + + Assets\smallTile-sdk.png + + + Assets\splash-sdk.png + + + Assets\squareTile-sdk.png + + + Assets\storeLogo-sdk.png + + + Assets\tile-sdk.png + + + Assets\windows-sdk.png + + + + + {b866a3f0-0d25-4146-9855-2c13c424f319} + Tasks + + + + + Microsoft Visual C++ 2013 Runtime Package for Windows Universal + + + Windows Mobile Extensions for the UWP + + + + 14.0 + + + + \ No newline at end of file diff --git a/Samples/CallerID/cs/CallerID.sln b/Samples/CallerID/cs/CallerID.sln new file mode 100644 index 0000000000..ab083e3d96 --- /dev/null +++ b/Samples/CallerID/cs/CallerID.sln @@ -0,0 +1,54 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CallerID", "CallerID.csproj", "{DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tasks", "Tasks\Tasks.csproj", "{B866A3F0-0D25-4146-9855-2C13C424F319}" +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 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.ActiveCfg = Debug|ARM + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.Build.0 = Debug|ARM + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.Deploy.0 = Debug|ARM + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.ActiveCfg = Debug|x64 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.Build.0 = Debug|x64 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.Deploy.0 = Debug|x64 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.ActiveCfg = Debug|x86 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.Build.0 = Debug|x86 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.Deploy.0 = Debug|x86 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.ActiveCfg = Release|ARM + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.Build.0 = Release|ARM + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.Deploy.0 = Release|ARM + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.ActiveCfg = Release|x64 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.Build.0 = Release|x64 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.Deploy.0 = Release|x64 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.ActiveCfg = Release|x86 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.Build.0 = Release|x86 + {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.Deploy.0 = Release|x86 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Debug|ARM.ActiveCfg = Debug|ARM + {B866A3F0-0D25-4146-9855-2C13C424F319}.Debug|ARM.Build.0 = Debug|ARM + {B866A3F0-0D25-4146-9855-2C13C424F319}.Debug|x64.ActiveCfg = Debug|x64 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Debug|x64.Build.0 = Debug|x64 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Debug|x86.ActiveCfg = Debug|x86 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Debug|x86.Build.0 = Debug|x86 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Release|ARM.ActiveCfg = Release|ARM + {B866A3F0-0D25-4146-9855-2C13C424F319}.Release|ARM.Build.0 = Release|ARM + {B866A3F0-0D25-4146-9855-2C13C424F319}.Release|x64.ActiveCfg = Release|x64 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Release|x64.Build.0 = Release|x64 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Release|x86.ActiveCfg = Release|x86 + {B866A3F0-0D25-4146-9855-2C13C424F319}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/CallerID/cs/Package.appxmanifest b/Samples/CallerID/cs/Package.appxmanifest new file mode 100644 index 0000000000..0651d9409b --- /dev/null +++ b/Samples/CallerID/cs/Package.appxmanifest @@ -0,0 +1,51 @@ + + + + + + Caller ID C# Sample + Microsoft Corporation + Assets\StoreLogo-sdk.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/CallerID/cs/SampleConfiguration.cs b/Samples/CallerID/cs/SampleConfiguration.cs new file mode 100644 index 0000000000..6f210e9f54 --- /dev/null +++ b/Samples/CallerID/cs/SampleConfiguration.cs @@ -0,0 +1,50 @@ +//********************************************************* +// +// Copyright (c) Microsoft. All rights reserved. +// This code is licensed under the MIT License (MIT). +// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY +// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR +// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. +// +//********************************************************* + +using System; +using System.Collections.Generic; +using Windows.ApplicationModel.Background; +using Windows.UI.Xaml.Controls; + +namespace SDKTemplate +{ + public partial class MainPage : Page + { + public const string FEATURE_NAME = "CallerID"; + + List scenarios = new List + { + new Scenario() { Title="Register the background task", ClassType=typeof(Scenario1_Register)}, + new Scenario() { Title="Call Origin Setting", ClassType=typeof(Scenario2_SetDefault)}, + }; + + public const string BackgroundTaskEntryPoint = "CallerIDBackgroundTask.SampleCallerIDBackgroundTask"; + public const string BackgroundTaskName = "SampleCallerIDBackgroundTask"; + + public static IBackgroundTaskRegistration FindBackgroundTaskRegistration() + { + foreach (var taskRegistration in BackgroundTaskRegistration.AllTasks.Values) + { + if (taskRegistration.Name == BackgroundTaskName) + { + return taskRegistration; + } + } + return null; + } + } + + public class Scenario + { + public string Title { get; set; } + public Type ClassType { get; set; } + } +} diff --git a/Samples/CallerID/cs/Scenario1_Register.xaml b/Samples/CallerID/cs/Scenario1_Register.xaml new file mode 100644 index 0000000000..9fdf320e7c --- /dev/null +++ b/Samples/CallerID/cs/Scenario1_Register.xaml @@ -0,0 +1,36 @@ + + + + + + + + + Registers a background task to handle unknown incoming calls. + + +

+

+ +

+

+

+ + + + + \ No newline at end of file diff --git a/Samples/Store/js/js/sample-configuration.js b/Samples/Store/js/js/sample-configuration.js index 82f2eaffa8..117b5a7f37 100644 --- a/Samples/Store/js/js/sample-configuration.js +++ b/Samples/Store/js/js/sample-configuration.js @@ -14,6 +14,7 @@ { url: "/html/scenario6-largeAppCatalog.html", title: "Large catalog product" }, { url: "/html/scenario7-appListingURI.html", title: "App listing URI" }, { url: "/html/scenario8-receipt.html", title: "Receipt" }, + { url: "/html/scenario9-b2b.html", title: "Business to Business" }, ]; function configureSimulatorAsync(filename) { diff --git a/Samples/Store/js/js/scenario9-b2b.js b/Samples/Store/js/js/scenario9-b2b.js new file mode 100644 index 0000000000..0dcc5681c2 --- /dev/null +++ b/Samples/Store/js/js/scenario9-b2b.js @@ -0,0 +1,94 @@ +//// Copyright (c) Microsoft Corporation. All rights reserved + +(function () { + "use strict"; + + var CurrentApp = Windows.ApplicationModel.Store.CurrentApp; + var HttpClient = Windows.Web.Http.HttpClient; + var HttpFormUrlEncodedContent = Windows.Web.Http.HttpFormUrlEncodedContent; + var HttpMediaTypeHeaderValue = Windows.Web.Http.Headers.HttpMediaTypeHeaderValue; + var Uri = Windows.Foundation.Uri; + + // Note: The methods on CurrentApp require your application to be published in the store and you must have a + // valid license. The best way to accomlish this is to publish your application once privately. Then, + // download it from the store once, and deploy over the top of it with this application after you have associated + // it with your store application. + var IAP_E_UNEXPECTED = -2143330041; + var IAP_E_UNEXPECTED_MESSAGE = "This scenario will not run correctly if you haven't associated it with an existing published application."; + + // Note: 'tenant', 'clientId', "clientSecret" and "appIdUri" will need to be updated based on your particular + // Azure Active Directory configuration. See the README for more information. + // https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx + var tenantId = "00000000-0000-0000-0000-000000000000"; + var clientId = "00000000-0000-0000-0000-000000000000"; + var clientSecret = "00000000000000000000000000000000000000000000"; + var appIdUri = "https://contoso.onmicrosoft.com"; + + var page = WinJS.UI.Pages.define("/html/scenario9-b2b.html", { + ready: function (element, options) { + document.getElementById("getCustomerCollectionsId").addEventListener("click", getCustomerCollectionsId); + document.getElementById("getCustomerPurchaseId").addEventListener("click", getCustomerPurchaseId); + } + }); + + function getCustomerCollectionsId() { + var token = getTokenFromAzureOAuthAsync().then(function (aadToken) { + if (aadToken !== undefined) { + return CurrentApp.getCustomerCollectionsIdAsync(aadToken, "kim@example.com"); + } + }).done(function (result) { + output.innerText = result; + }, function (err) { + if (err.number == IAP_E_UNEXPECTED) { + WinJS.log && WinJS.log("GetCustomerPurchaseIdAsync failed: " + IAP_E_UNEXPECTED_MESSAGE, "sample", "error"); + } + else { + WinJS.log && WinJS.log("GetCustomerPurchaseIdAsync failed: " + err, "sample", "error"); + } + }); + } + + function getCustomerPurchaseId() { + var token = getTokenFromAzureOAuthAsync().then(function (aadToken) { + if (aadToken !== undefined) { + return CurrentApp.getCustomerPurchaseIdAsync(aadToken, "kim@example.com"); + } + }).done(function (result) { + output.innerText = result; + }, function (err) { + if (err.number == IAP_E_UNEXPECTED) { + WinJS.log && WinJS.log("GetCustomerPurchaseIdAsync failed: " + IAP_E_UNEXPECTED_MESSAGE, "sample", "error"); + } + else { + WinJS.log && WinJS.log("GetCustomerPurchaseIdAsync failed: " + err, "sample", "error"); + } + }); + } + + function getTokenFromAzureOAuthAsync() { + var map = Windows.Foundation.Collections.StringMap(); + map["grant_type"] = "client_credentials"; + map["client_id"] = clientId; + map["client_secret"] = clientSecret; + map["resource"] = appIdUri; + + var client = new HttpClient(); + var content = new HttpFormUrlEncodedContent(map); + + content.headers.contentType = new HttpMediaTypeHeaderValue("application/x-www-form-urlencoded"); + + var uri = new Uri("https://login.microsoftonline.com/" + tenantId + "/oauth2/token"); + return client.postAsync(uri, content) + .then(function (result) { return result.content.readAsStringAsync(); }) + .then(function (responseString) { + var response = JSON.parse(responseString); + if (response.access_token === undefined) { + WinJS.log && WinJS.log("Failed to load Azure OAuth Token.", "sample", "error"); + } + + return response.access_token; + }, function (err) { + WinJS.log && WinJS.log("Failed to load Azure OAuth Token: " + err, "sample", "error"); + }); + } +})(); diff --git a/Samples/Store/shared/Scenario9_B2B.xaml b/Samples/Store/shared/Scenario9_B2B.xaml new file mode 100644 index 0000000000..4dd9a9325c --- /dev/null +++ b/Samples/Store/shared/Scenario9_B2B.xaml @@ -0,0 +1,34 @@ + + + + + + + + These APIs are used to retrieve secure tokens that can be saved by the application's servers + to query the user's collection or grant a user access to a product. + +
Tiles, toasts, and notifications
Notifications Secondary tiles