The relatively big news today is the sudden appearance of the soon to be released Windows Phone 8 Developer Preview SDK which has leaked a few hours ago via Microsoft’s own password protected servers. Instead of making tons of posts detailing every single feature of the OS simply to generate hits I’m going to provide you with the detailed overview of the Windows Phone 8 application platform which I’m going to copy and paste (from the SDK) below after the break for those of you who aren’t able to get their hands of the Docs or the full SDK package. I’m also currently installing the full 1.3Gb Binaries on by Windows 8 desktop (important note: The WP8 Preview SDK is only compatible with the Windows 8 X64 Release Preview) and will make another post later on detailing the emulator. UPDATE: My WP8 Emulator overview is here.
The following document will go into details comparing Windows Phone 8 and Windows RT (hint: there are some important differences), The Direct3D feature set supported by the OS, the built-in Native Nokia Maps implementation, Camera features, NFC features Native code and XAML support. So just head over to the break to check it all out:
Application platform overview for Windows Phone 8
Windows Phone 8 Developer Preview brings a number of new features to app developers, including native gaming development, a phone-specific version of the Windows Runtime, and a new NT-based kernel.
This document is an overview for key partners of the Windows® Phone business of the features in the upcoming Windows Phone 8 Developer Preview release. This paper addresses high-level technical considerations to help Microsoft® partners plan their Windows Phone 8 Developer Preview apps, and customer experiences. Because Windows Phone 8 Developer Preview is still in development, the product described in this document is subject to change. All information in this white paper is Microsoft Confidential and protected by nondisclosure agreements.
Windows Phone 8 Developer Preview
Windows Phone 8 Developer Preview has been reengineered from the kernel up to offer shared development and user experiences across Microsoft platforms, featuring a new NT-based kernel, support for native C++ development, a phone-specific version of the Windows 8 Runtime (currently dubbed WinPRT), Direct3D®, high-resolution displays, multi-core devices, expandable storage, and more. But the Windows Phone 8 Developer Preview strategy isn’t only integration and commonality of development techniques between platforms. Windows Phone 8 Developer Preview supports multiple resolutions, form factors, and memory capacities, offering customers a range of phone models and price points to choose from.
This topic contains the following sections.
- Windows Phone 8 Developer Preview app models
- Windows 8 and Windows Phone 8 Developer Preview development comparison
- Feature upgrades
- Related Topics
Windows Phone 8 Developer Preview app models
In this section, we describe app models that developers can use on the Windows Phone 8 Developer Preview platform.
Native development in C++
Windows Phone 8 Developer Preview supports native development. Thanks to WinPRT, Windows Phone 8 Developer Preview is able to support a significant subset of the Windows 8 SDK, enabling developers to share a significant amount of code between Windows 8 and the phone, particularly for native apps. Microsoft recognizes that the lack of native support on Windows Phone has been a blocker for many developers who have existing apps and games on other platforms, and with the addition of native development support, Windows Phone 8 Developer Preview reduces the need to port and maintain components such as compute engines, graphic libraries, and API sets.
In addition to native development, Direct3D® is being added to the family of Windows Phone technologies. This means that for the first time, a DirectX-based PC game can share much of its code base with a phone version, and developers can use state-of-the-art middleware tools and engines that power the industry’s biggest game titles to develop games for Windows Phone. This also means that performance issues that have constrained games created using managed frameworks (such as intrusive Garbage Collector activity and wrapper overhead) can be mitigated by developers who are willing to “hand-optimize.”
Managed apps are characteristically written with a XAML page or XNA® Framework surface as the app interface, and Visual Basic® or C# as the coding language. Existing Windows Phone apps that were written using these techniques are fully compatible with Windows Phone 8 Developer Preview. Game developers who prefer to write managed code still have XNA as an option. XAML-based apps have gained new features such as new controls, auto-scaling to high resolution, and the integration of Direct3D surfaces into a XAML-based app. New managed APIs coming to Windows Phone 8 Developer Preview include a new map control powered by Nokia maps and a wallet API for storing payment methods and enabling NFC-based payments.
Mixed-mode app development
Hybrid app development is an attractive choice for developers who want the convenience of XAML controls to use in their user interface, but who would like to port an existing C++ app, prefer coding in C++, or would like to use a Direct3D surface in their app. For Windows Phone, Microsoft provided Original Equipment Manufacturers (OEMs) and mobile operators (MOs) with a limited, “hybrid” SDK, which leveraged COM Interop and had an “allow-list” of available native APIs. In Windows Phone 8 Developer Preview, WinPRT is the Interop model, and all Marketplace developers have access to the same SDK and tools to help them develop their Windows Phone 8 Developer Preview apps.
HTML app development options
For more information about developing with Internet Explorer Mobile 10, see the Internet Explorer 10 Guide for Developers.
Windows 8 and Windows Phone 8 Developer Preview development comparison
Appearing first in Windows 8, the new Windows Runtime, or WinRT, is designed to provide a consistent API surface area for access to platform features across all supported programming languages, managed and native. Windows Phone 8 Developer Preview is adopting a subset of the Windows 8 SDK that includes WinPRT as well as some COM and Win32 APIs.
Differences between WinRT on Windows 8 and WinPRT on Windows Phone 8 Developer Preview
The following diagram shows an overview of the major areas for the Windows Phone 8 Developer Preview native API surface. Green boxes are subsets or are identical in the Windows 8 SDK. White boxes (or sub-boxes) represent new APIs new in Windows Phone 8 Developer Preview.
Native API additions
This section explains additions to the Windows 8 Native API surface for Windows Phone 8 Developer Preview.
|API Name||Description of differences|
|Keyboard (SIP) / TextComposition||New APIs that represent text as it is being composed, and show or hide the on-screen keyboard when a custom text box has focus. This is so that developers of Direct3D-based games can create their own text boxes that behave like the ones provided by HTML and XAML.|
|Speech||New APIs enable speech recognition, synthesis, and shell integration so that apps can be launched by using speech commands. For more information see Speech for Windows Phone.|
|Camera||Additional APIs enable deeper camera configuration, access to live previews, and multiframe capture scenarios.|
|Launchers/Choosers||API differs from WinRT in that choosers (known as “pickers” in Windows 8) can return data to a phone app that has been tombstoned. The FileOpenPicker does not support generic file picking from system folders, and only brings up the Photo Chooser in Windows Phone 8 Developer Preview.|
|Bluetooth||New APIs enable a native Bluetooth stack. The Windows Phone 8 Developer Preview version of this API adds the ability to communicate between the same app running on two phones, and the ability for an app to communicate directly with a paired device (such as a heart rate monitor for a workout app).|
|In-App Purchasing||New APIs enable users to purchase downloadable content from within an app, such as “consumables” (for example, gold coins in a game) and “durables” (such as a new level in a game).|
For more information about WinRT, see The Windows Runtime. For more information about Windows Phone 8 Developer Preview and WinRT, see Windows Runtime and Windows Phone 8
Game development on Windows Phone 8 Developer Preview
Like Windows 8, the Windows Phone 8 Developer Preview SDK features tools to help develop, test, and profile the performance of your game. Microsoft has tried to strike a balance between the feature level support available in DirectX and considerations like hardware complexity and battery life in bringing DirectX technology to Windows Phone 8 Developer Preview. Here are the key ways in which native gaming development on Windows Phone 8 Developer Preview differs from the desktop.
- Windows Phone 8 Developer Preview only supports Direct3D, not the entire DirectX runtime. This means that D2D, DWrite, and WIC are not supported.
- The DirectX feature level supported in Windows Phone 8 Developer Preview is level 9_3, the supported vertex shader model version is 2.0, and the supported pixel shader model version is 2.0.
- Although Windows Phone 8 Developer Preview supports XAudio2 for sound effects, music playback is not be handled by XAudio2, but instead by managed APIs that enable access to music assets. Only PCM or ADPCM audio assets can be used for sound effects.
- Talks continue with key middleware vendors but we are not able to announce any middleware compatibility with Windows Phone 8 Developer Preview just yet.
For more information about the feature details supported in Windows Phone 8 Developer Preview, see Native graphics APIs for Windows Phone 8, Native audio APIs for Windows Phone 8.
Now that you know the biggest changes coming for Windows Phone 8 Developer Preview developers, here is a roundup of some of the other new features, and feature improvements.
There are additions for creating VOIP apps, for more information, VoIP apps for Windows Phone 8.
Different screen resolutions are supported in Windows Phone 8 Developer Preview: WVGA, WXGA, and 720p. The pixel resolutions, aspect ratios, and scaling factors are detailed and simulated in the following table and illustration.
|Name||Resolution||Aspect Ratio||Delta from Windows Phone 7.1|
|WVGA||480 × 800||15:9||None|
|WXGA||768 × 1280||15:9||1.6x Scale|
|720p||720 × 1280||16:9||1.5x Scale, plus 53 pixels “taller”|
Existing Windows Phone apps run on WVGA, WXVGA, and 720 phones without changes, and scale according to the preceding chart, with crisper text and vector art on the higher-resolution displays. App developers should consider producing high-resolution versions of their apps using higher-quality bitmap assets, which look beautiful on the high-resolution displays and scale down with comparable quality to WVGA. Developers can check for screen resolution in their apps by using new properties that expose resolution values, and emulator support for the various resolution options have been added to the Windows Phone SDK. For more information, see Windows Phone 8 Emulator.
Two exciting new Marketplace features that should significantly enhance app monetization are coming to Windows Phone 8 Developer Preview:
- In-App Purchasing, for conversion of a trial/lite version of an app into the paid version, as well as “consumables” (such as gold coins in a game) and “durables” (such as a new level in a game), all without leaving the context of your app.
- The “wallet,” with which users can directly purchase Marketplace content using stored payment options, such as a credit card, gift card, or PayPal account, instead of relying on the mobile operator to bill them later. The wallet also enables “contactless” NFC-based payment using Windows Phone 8 Developer Preview phones that feature NFC hardware.
Near-field proximity functionality
Users with phones that feature Near-Field Communication (NFC) hardware can share their experiences across Windows Phone 8 Developer Preview devices. Targeted NFC scenarios include the following:
- Sharing data between two Windows Phone 8 Developer Preview devices, or between Windows Phone 8 Developer Preview devices and Windows 8 devices.
- Bluetooth pairing using Simplified Tag Format and Static Handover.
- Sharing data over Wi-Fi, Wi-Fi Direct, and Bluetooth by using NFC to set up the channel between devices.
- Reading and writing NFC Data Exchange Format (NDEF) messages to and from NFC Forum Tag Types 1-4, as defined by the NFC Forum.
- Offering Marketplace developer access to new proximity APIs that they can use in any number of exciting near-field device-to-device scenarios.
- “Contactless payment” by “swiping the phone” across NFC radio devices that can identify the payment options stored on the phone and process transactions instantly.
Proximity functionality is also possible using Bluetooth, thanks to Windows Phone 8 Developer Preview featuring the WinPRT APIs StreamSocket and PeerFinder, through which apps can discover, connect to, and exchange data with nearby phones.
Removable SD cards
Windows Phone 8 Developer Preview supports hot-swappable SD cards, and provide read-only API access to user content stored on them.
New camera capability and lens apps
An all-new camera API in Windows Phone 8 Developer Preview greatly expands access to the phone’s camera, offering such functionality as:
- Camera parameter configuration, such as ISO speed and exposure.
- Real-time access to the phone’s video stream.
- Lenses, which are special camera apps that can provide enhanced camera functionality such as effects, filters, and computational photography.
- Multiframe capture for creating new types of camera experiences and imagery.
The lens experience
When a user presses the hardware shutter button or taps Camera in the App list, the built-in Camera app starts. From there, the Lens button appears in the Application Bar, as shown in the following figure.
The Lens button opens the lens picker, from which a user can choose a lens for the camera. The lens picker displays a list of apps in Marketplace that support lenses. The following figure shows the lens picker, with some example lenses.
Lenses shown in the lens picker also are listed in Marketplace in their standard app categories. Although a lens must provide a viewfinder experience when launched from the lens button, the app can provide other experiences, too. For example, you might create a productivity app that displays a panorama control when a user starts it from the App list. But when a user starts the app from the lens picker, it displays a viewfinder.
When a user taps a lens in the lens picker, the corresponding app is launched via a deep link URI. The deep link URI targets the corresponding app and includes the string ViewfinderLaunch to indicate that the app is to be launched as a lens. Apps can use the deep link URI to recognize a lens launch.
After opening a lens, the user can tap the hardware Back button to return to the built-in Camera app. This sequence is shown in the following figure.
A line-of-business app (LOB app) is an app with special security capabilities and restrictions that service a particular customer transaction or business need. In Windows Phone 8 Developer Preview, LOB apps can be obtained through an app discovery service that is set up within a secure network to which the phone is joined.
The additions of NTLM authentication support, always-on secure boot capabilities, and 128-bit BitLocker® drive encryption of the phone’s internal storage make Windows Phone 8 Developer Preview enterprise-ready, and able to securely handle high-value business data.
New to Windows Phone 8 Developer Preview is a robust speech API for speech recognition and synthesis. Exposed as a WinPRT component for easy Marketplace developer access, the API also enables the registration of parameterized voice commands with the phone that work even if an app is not running. “Launch Contoso Movies and buy a ticket for tonight” would be an illustrative example of a parameterized command, with “buy a ticket” and “for tonight” being parsed like method arguments. For more information, see Speech for Windows Phone.
Marketplace developers have API access to the Windows Phone 8 Developer Preview Bluetooth stack, courtesy of WinPRT. This provides rich functionality between paired accessories and other phones, and enables support for the RFCOMM protocol.
New data APIs
Two new data storage APIs are included in Windows Phone 8 Developer Preview:
- File I/O via a WinPRT API, enabling read-only access to the user data in the SD card slot.
- Native Win32 storage APIs, which largely resemble the data APIs documented here.
Expanding on the App Connect functionality from Windows Phone 7.1, Windows Phone 8 Developer Preview features search extensibility, with which you can enhance the discoverability of your app in Marketplace when users search the web using Bing on their phone. You can associate a new system of “verbs” with your app to help a user complete a task (for example, “reserve” for reserving a table). When user searches include such verbs, your app will surface on a Quick Card in their results, and your app’s relevance will be boosted. And if a user has already installed your app, and it shows up on the Quick Card as being able to complete the task, tapping the link to your app will send the parameters of their search to your app, enabling them to get down to the business of completing their task.
App-to-app communication APIs
In Windows Phone 8 Developer Preview, apps can use an API call to launch other apps, and associate themselves as the default handlers for certain file types. The launch of other apps can be parameterized using custom URI schemes that the target app defines. For example, a link to “skype://5551234?call” would launch Skype, and then call the number 555-1234. If multiple apps are registered as handlers for a particular file type or URI scheme, the phone prompts the user to select their preferred default behavior.
Windows Phone 8 Developer Preview inherits new functionality from the Windows 8 and Microsoft® .NET Framework networking stacks, adding support for IPv6, listener sockets, and more granular information about connected endpoints. Among other things, these API enhancements, which include the Bind, Listen, and AcceptAsync methods, support scenarios that involve peer-to-peer connections between phones.
The Windows Phone map system is being upgraded to Nokia Maps, which features beautiful cartography, more complete and accurate map data, a new 3-D mode, and hardware-accelerated rendering for smooth performance. A new WinPRT-based location API also accompanies the new Nokia Maps control and provides functionality new to the Windows Phone platform such as generating driving directions with an API call so that they can be included in your app. Existing apps that include the Bing Maps control will continue to work.
Once you set the center and zoom level of a map, you might want to set the cartographic mode of the map. The cartographic mode defines the display and the translation of coordinate systems from screen coordinates to world coordinates on the Map control. You can use the CartographicMode property of the Map control to set the cartographic mode of the map. This property takes values from the MapCartographicMode enumeration. The following types of cartographic modes are supported in the MapCartographicMode enumeration:
- Road : displays the normal, default 2-D map.
- Aerial : displays an aerial photographic map.
- Hybrid : displays an aerial view of the map overlaid with roads and labels.
- Terrain : displays physical relief images for displaying elevation and water features such as mountains and rivers.
The following illustration displays the four cartographic modes.
You can display the map in a light color mode or a dark mode by using the ColorMode property. The value that this property can take—Light or Dark—is specified in the MapColorMode enumeration. The default is Light.
In the following illustration, the first map is in the Light color mode and the second map is in the Dark color mode.
Pedestrian features and landmarks
You can also display additional elements on your map, such as landmarks and pedestrian features. Set the LandmarksEnabled property to true to display landmarks on a Map control, and set PedestrianFeaturesEnabled to true on a Map control to display pedestrian features such as stairs. Landmarks are visible on the map only when the ZoomLevel property is set to 7 or higher, and the Pitch property is set to 25 or higher.
The following illustration displays a map with landmarks and pedestrian features.
Media library API
For the first time, the phone’s media library is open to Marketplace developers who can use a new API to add and delete media, including music, pictures, and audio.
The XAML platform offers controls that make common user interactions very easy to implement, and Windows Phone 8 Developer Preview brings some welcome new features:
- Toolkit-only controls such as LongListSelector, and SDK-only controls such as Panorama and Pivot, are being moved in-ROM for better performance, appearance, and upgradability.
- Updated text rendering and font control that match the fonts seen in the in-ROM/built-in Windows Phone apps. For more information, see Creating bidirectional apps for Windows Phone 8.
- New launchers and choosers, such as SaveAppointmentTask.
- Emoji support.
- Auto-scaling to handle multiple resolutions. For more information, see Multi-resolution app development in Windows Phone 8
Windows Phone 8 Developer Preview is a great step forward for the Windows Phone platform and brings bold new possibilities thanks to a diverse choice of hardware, first-class development tools, exciting new features, and a flexible platform that lets developers choose from several paradigms when creating apps and games. With the addition of DirectX technologies, multi-core support, high-resolution screens, improved Marketplace integration, and the existing Xbox LIVE integration, Windows Phone 8 Developer Preview is designed to be Microsoft’s most robust mobile gaming platform yet. Exciting new features like the new speech API, near-field proximity capability, and deep control of the camera by Marketplace developers enable usage scenarios that are all-new for Windows Phone. Line-of-business capability turns Windows Phone 8 Developer Preview into a powerful, enterprise-ready tool for businesses, helping to automate tasks in the field, and provide rich, connected, and secure experiences that greatly enhance remote productivity. And with a number of hardware options, Windows Phone 8 Developer Preview devices offer a lot of value to customers with specific needs and features that are important to them.