Download presentation
Presentation is loading. Please wait.
Published byChristian Phelps Modified over 9 years ago
5
Windows Binary Phone Binary
9
Windows universal Desktop PC 2 in 1 Mobile Tablet Phablet Phone Xbox IoT Band IoT headless Raspberry Pi Home Automation Surface Hub Holographic HoloLens
10
Phone Device Xbox Device Desktop Device Windows Core Universal Windows Platform
11
Many UWP apps will not need to use any device family-specific APIs, but for those that do, we have Platform extension SDKs
12
Phone Device Xbox Device Desktop Device Windows Core Universal Windows Platform Windows App Phone extension Xbox extension Desktop extension
13
Platform extensions don't invalidate binaries on other devices
14
IsApiContractPresent IsEnumNamedValuePresent IsEventPresent IsMethodPresent IsPropertyPresent IsReadOnlyPropertyPresent IsTypePresent IsWriteablePropertyPresent Windows.Foundation.Metadata.ApiInformation
15
var api = "Windows.Phone.UI.Input.HardwareButtons"; if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent(api)) { Windows.Phone.UI.Input.HardwareButtons.CameraPressed += CameraButtonPressed; }
16
The ApiInformation API tests for availability of a type or contract at runtime
23
var contract = "Devices.Scanners.ScannerDeviceContract"; int majorVersionRequired = 3; if (Windows.Foundation.Metadata.ApiInformation. IsApiContractPresent(contract, majorVersionRequired )) { // Call the API that is present in V3 and above... } else { // Your original code supporting users who haven’t upgraded yet... }
25
Runs on all UWP device families: Runs on all UWP, but limitations apply to Desktop: Runs only on Mobile device family:
26
<PackageDependency Name="Microsoft.WinJS 1.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" minVersion ="1.5.0.0" />
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.