1. Introduction au développement
Windows Phone 8
Jean-Sébastien Dupuy
Windows Phone Technical Evangelist - Microsoft France
@dupuyjs / jdupuy@microsoft.com
4. Tile Templates and Tile Sizes
• Windows Phone 8 supports three Tile
templates
• Flip – flips from front to back (similar to the
WP 7.1 Tile template)
• Iconic – clean iconic layout designed to reflect
Windows Phone design principles
• Cycle – cycles through up to nine images
4
5. Lock Screen on Windows Phone 8
• You can register your app as a lock screen
provider, which enables:
• User can select your app to show
detailed status on the lock screen
• Can select your app as one of the five
apps to show quick status (icon and
count)
• Can select your app as the lock screen
background image provider
5
11/5/2013
6. Maps
• Windows Phone 8 has new Maps controls
• Bing Maps control from Windows Phone OS 7.1 is still supported, but deprecated
• The new Maps controls use technology supplied by Nokia
• New features:
• Vector-based for faster rendering
• Four cartographic map modes
• Light and dark color modes
• Display landmark and pedestrian features
6 Microsoft
11/5/2013
7. Location and Location Tracking
• New Location API in the Windows Phone Runtime API set
• Similar to Windows 8 Location API
• Windows Phone OS 7.1 .NET Location API still supported
• Background location-tracking apps
• Run continuously in the background when the user
navigates away from the app
• Enables scenarios such as Run Trackers, turn-by-turn
navigation
7 Microsoft
11/5/2013
8. Speech
• Windows Phone 8 allows you to enable users to
robustly interact with your app using their voice
• Two types of voice interaction are new:
• Voice Commands - Allows users to deep-link into your
app by holding down the Start button and speaking a
prefix you specify for your app, followed by a command
that you define.
• Speech Recognition and Text-to-Speech APIs - While
in the context of your app, allow users to provide input
using their voice, and readout text to users via text-tospeech
8 Microsoft
11/5/2013
10. File and Protocol Associations
Enables App to App Communication
• App can register a File Association
• Automatically launch your app when a file of the registered type is
received as an email attachment or opened in the browser, or through
Sharepoint
• One app can launch another by sending it a file of the registered type
• App can register a protocol
• Allows your app to automatically launch when another app ‘opens’ a
special URI
• Protocol is the first part of a URI, e.g.
myprotocol:/ShowProducts?CategoryID=aea6ae1f
• App launches another and passes it data in the remainder of the
launch URI
10
Microsoft confidential
11/5/2013
12. Vous avez dit Phablet ?
Support du 1080p HD (1920x1080)
Qualcomm Snapdragon 800 quad-core
13. Driving mode
Limite les notifications sur l’écran de
verrouillage pendant la conduite
Permet de filtrer les appels et/ou les sms
(réponse automatique optionnelle)
15. Quels changements pour les développeurs?
// Numéro de version de la GDR3
private static Version TargetVersion = new Version(8, 0, 10492);
// Fonction pour déterminer si le périphérique supporte les fonctionnalités demandées
public static bool IsTargetedVersion
{
get {
return Environment.OSVersion.Version >= TargetVersion;
}
}
16. Quels changements pour les développeurs?
public enum Resolutions { WVGA, WXGA, HD };
public static class ResolutionHelper
{
private static bool IsWvga { get { return App.Current.Host.Content.ScaleFactor == 100; } }
private static bool IsWxga { get { return App.Current.Host.Content.ScaleFactor == 160; } }
private static bool IsHD { get { return App.Current.Host.Content.ScaleFactor == 150; } }
public static Resolutions CurrentResolution
{ get {
if (IsWvga) return Resolutions.WVGA;
else if (IsWxga) return Resolutions.WXGA;
else if (IsHD) return Resolutions.HD;
else throw new InvalidOperationException("Unknown resolution"); } }
}
17. Quels changements pour les développeurs?
Si vous supportez le 720p, alors vous supportez le 1080p
Attention au ScaleFactor vs DeviceExtendedProperties
Augm. de la mémoire max à 570MB sur les devices 2GB
Augm. de la mémoire pour l’audio en background de 20 à 25MB (dev.
1GB)
Nouvelles Uris pour accéder aux paramètres:
ms-settings-power: (économiseur d’energie)
ms-settings-screenrotation: (verrouillage rotation)
18. Quels changements pour les développeurs?
L’économiseur d’énergie est-il activé ?
public static bool? IsSavingModeEnabled
{
get
{
if (IsGDR3 == true)
{
return (bool)typeof(PowerManager).GetProperty("PowerSavingModeEnabled").GetValue(null);
}
}
}
return null;
19. Quels changements pour les développeurs?
Sons personnalisés pour les toasts notifications
WAV, WMA, MP3 (moins de 10 secondes)
Doit être présent dans l’Isolated Storage de l’application
Valable pour les notifications locales et cloud
Possible d’avoir des notifications silencieuses
20. public void ShowToast(bool useCustomSound, bool useWavFormat, bool doSilentToast)
{
ShellToast toast = new ShellToast();
toast.Title = "[title]";
toast.Content = "[content]";
//If the device is running the right version and a custom sound is requested
if ((IsTargetedVersion) && (useCustomSound))
{
if (useWavFormat)
{
//Do the reflection to get the new Sound property added to the toast
SetProperty(toast, "Sound", new Uri("MyToastSound.wav", UriKind.RelativeOrAbsolute));
}
else
{
//Do the reflection to get the new Sound property added to the toast
SetProperty(toast, "Sound", new Uri("MyToastSound.mp3", UriKind.RelativeOrAbsolute));
}
}
toast.Show();
}
21. What’s next ?
Nouvelles images pour l’émulateur
(prochainement)
Windows Phone Preview for Developers
(Over the Air)
22. Shared Windows Core
Windows 8 and Windows Phone 8 Share Many Components At The Operating System Level
OS Modules
22
Microsoft confidential
11/5/2013
Windows NT Kernel
Windows Kernel
Windows Kernel
23. Quelques chiffres
Windows Phone 8 en pleine croissance…
$$$
+Revenus
+Marchés
+Développeurs
+Utilisateurs
¹ IDC Worldwide Mobile Phone Tracker (CYQ2 2013)
² VisionMobile (CYQ3 2013)
³ Windows Phone Store (10/30/12 – 8/31/13) Since launch of WP8
26. Windows Phone App Studio
App Studio is a web-based tool that allows you to enter the world of building Windows Phone apps simply by combining your
text and visual content with your own creativity to quickly construct an app you can use and share in four easy steps:
Have an idea
1
Start with an empty app shell or
choose from dozens of app
templates
Add content
Choose style
3
2
Add images, text, photos, HTML5
and various feeds such as RSS,
YouTube and Flickr
Choose color palettes and
generate live tiles and splash and
lock screens from your content
apps.windowsstore.com
Use it
4
Use it immediately on your phone,
open your source code in Visual
Studio, or take your XAP over
Windows Phone Store to publish
27. Obtenir les Outils
SDK 8.0 (Visual Studio 2012, cible Windows Phone 7.5 et 8.0)
+ SDK Update for Windows Phone 7.8
SDK 7.1 (Visual Studio 2010, cible Windows Phone 7.5 et 7.0)
+ SDK 7.1.1 Update
+ SDK Update for Windows Phone 7.8
Ou directement Visual Studio 2013 RC
28. Prérequis Windows Phone SDK 8.0
Votre ordinateur doit supporter les conditions suivantes pour installer le
Windows Phone SDK 8.0:
Système d’exploitation
Windows 8 64-bit (x64)
Matériel
8 GB d’espace disque disponible
4 GB de mémoire vive (recommandé)
64-bit (x64)
Emulateur Windows Phone
Windows 8 Pro ou plus (Hyper-V) et Second
Level Address Translation (SLAT)
29. De Visual Studio au Windows Phone Store
myapp.xap
Windows Phone
device
Windows Phone
Emulator
30. Compte Développeur Windows Phone
Il n’est pas nécessaire d’avoir un compte développeur Windows Phone pour télécharger le SDK et
débuter le développement des applications
En revanche, il est nécessaire d’avoir un compte développeur pour publier votre application sur le
Windows Phone Store (+déverrouillage de trois téléphones)
Nouveau: Si vous ne disposez pas d'un compte développeur, vous pouvez déverrouiller un
téléphone pour tester votre application
Pour obtenir un compte de Développeur:
Inclus dans les abonnements MSDN
Gratuit pour les étudiants dans l’abonnement Dreamspark
$19 par an dans les autres cas
Demandez votre compte depuis le Windows Phone Developer Center
http://dev.windowsphone.com
32. Publiez comme vous voulez …
Modèles de Publication
Beta
Publique
Privé
Portail d’entreprise (Company Hub)
Monétisation
Gratuit / Payant / avec ou sans version d’évaluation
In-App Purchase ( Durables ou Consommables )
Publicité
33. Pour résumer …
Introduction au développement Windows Phone 8
• Innovation
• Profitez des nouvelles APIs pour offrir une expérience unique à vos clients
• Expérience partagée entre Windows Phone et Windows 8
• Opportunité de distribution globale
• 191 pays sont couverts actuellement
• Monétisation
• Choisissez le modèle qui vous convient : Gratuit, Payant, Evaluation,
Publicité, In-App Purchase, …
• Carte Bleu, Paypal, Opérateur Mobile, …
35. Langages et APIs
Introduction au développement Windows Phone 8
Microsoft capitalise sur les langages et vos compétences :
•Code Managé : C#, VB.NET
•Code Natif : C++
•Web : HTML 5 / JavaScript / CSS
36. Interface XAML et Code Managé (C#, VB)
• La manière la plus traditionnelle de développer
des applications Windows Phone
• Interface définie en XAML
• Logique écrite avec C# ou Visual Basic .NET
• Accès aux APIs .NET et Windows Phone Runtime
XAML & C#/VB
.NET API for
Windows
Phone
Windows
Phone
Runtime
Managed
Managed
37. XAML/Managé + Code Natif
• Les Apps Managed peuvent interagir avec des composants natifs
• Ajoutez des composants Windows Phone Runtime à votre solution XAML/Managed
(Interop Win32 et COM possible)
• Les jeux d’API Win32 supportent les fonctions Winsock et File I/O pour faciliter les portages
applicatifs depuis du code natif
• Permet d’implémenter des composants ‘compute-intensive’ en code natif pour améliorer les
performances
• Traitement d’images, modules de calcul, moteur de rendu …
XAML & C#/VB.NET & C++
.NET API for
Windows
Phone
Managed
Windows
Phone
Runtime
Win32 &
COM
Native
38. Développement HTML5
• Le développement d’applications HTML5/JavaScript ‘Windows
8-style’ n’est pas supporté sous Windows Phone 8
• Projections de la Windows Phone Runtime disponibles en
C#/VB.NET et C++ uniquement
• Cependant, Windows Phone 8 inclus Internet Explorer 10
• Même code partagée avec Windows 8
• Très bon support du code HTML5 (2x plus de fonctionnalités
supportées comparé à Windows Phone 7.5)
• Nouveau moteur de traitement JavaScript (4x plus rapides que
Windows Phone 7.5)
• Le même moteur est au cœur du contrôle WebBrowser
• Vous pouvez construire des applications HTML5 basée sur le
contrôle WebBrowser reposant sur du contenu local ou web
39. Jeux XNA en Code Managed (C#, VB)
• Vous pouvez développer des jeux pour Windows Phone
via XNA framework
• Mêmes fonctionnalités que Windows Phone SDK 7.1
• Logique écrite en C# ou Visual Basic .NET
• Accès aux APIs .NET 7.1, pas d’accès aux APIs Windows
Phone 8
• Modèles de projets identiques à ceux de Visual Studio
2010
• MonoGame pour Windows Phone 8 (Open Source)
XNA & C#/VB (+XAML)
.NET API for
Windows
Phone 7.1
XNA Libraries
for Windows
Phone 7.1
Managed
40. Application Direct3D
• Application Direct3D écrite en code natif, utilise
uniquement Direct3D pour l’interface
• Développement de Jeux – permet de partager des
portions significatives de code avec la version PC
• Accès aux APIs Windows Phone Runtime
• Plus simple de partager des composants natifs :
moteurs de rendu, librairies graphiques et jeux d’APIs
Direct3D & C++
Windows
Phone
Runtime
Win32 &
COM
Native
Native
41. Direct3D et XAML
• Il est également possible de développer des applications en code managed et XAML qui
incorporent des graphiques Direct3D
• Contrôles DrawingSurface et DrawingSurfaceBackgroundGrid
XAML & C#/VB.NET & C++
.NET API for
Windows
Phone
Windows
Phone
Runtime
Windows
Phone Runtime
(Direct3D)
Win32 &
COM
Managed
Managed
Native
Native
45. L’émulateur Windows Phone
Introduction au développement Windows Phone 8
• Support des différentes résolutions
• Support des différents OS / contraintes mémoires
• Possède sa propre IP
• Support du multi-touch !
• Captures, Accéléromètre, GPS…
46. Déploiement sur un terminal
Introduction au développement Windows Phone 8
• Windows Phone 7.1
• USB + Zune
• Windows Phone 8
• USB seulement
47. Windows Phone Developer Registration
Introduction au développement Windows Phone 8
Permet de déverrouiller un
téléphone à l’aide de votre compte
de développement
48. Simulation dashboard
Introduction au développement Windows Phone 8
• Simulation de la vitesse de la connexion
Internet
• Verrouillage de l’écran
• Envoie de « rappels »
49. Le débogue
Introduction au développement Windows Phone 8
• Comme n’importe quel programme sous Visual Studio
• Emulateur & Terminal
• Points d’arrêts
• Pas à pas
• Affichage & Modification de variables
50. Application Deployment Tool
Introduction au développement Windows Phone 8
• Déploiement d’un fichier .xap dans
l’émulateur ou directement sur le
téléphone (pas besoin du code
source)
59. Les principes
2 grands principes de navigation: le panorama et le pivot.
Le Drill-down est l’approche majoritairement reconnue.
63. Ressources
Windows Phone Developer Center
Parcours Windows Phone des Techdays 2013
Communauté Développeurs Windows Phone (sur facebook)
Accélérateur Windows (aka.ms/accelerateur-windows)
http://blogs.msdn.com/jdupuy
There are several things you can do with Tiles: Support multiple sizes, customizable by your customer.Choose from one of three visual templates to help your app stand out.Offer a variety of secondary Tiles.Control which page your customers land on when clicking on your secondary Tiles.The Tile API wraps the OS Tile experience so 3rd party app developers have access to exactly the same tile functionality as the built-in apps.
SpeechIn Windows Phone 8 SDK, users can interact with your app using their voice.
On two devices that each have a Near-Field Communication (NFC) chip, app users can perform these scenarios simply by tapping their phones, or phone and tablet together
You can use file and protocol associations in Windows Phone 8 to automatically launch your app when another app launches a particular file type or protocol. For example, a file association allows your app to launch to handle an email attachment. You can also use the association launching API to launch another app based on a specific file type or protocol.
Key delivery point: Our market execution and reach is delivering significant results: dramatic growth in customers, developers, and apps. In partnership with OEMs, mobile operators and developers, we are building a healthy 3rd mobile ecosystem that is delivering real gains for partners.Note: the increases in app revenue and downloads reference is since launch of Windows Phone 8Reference industry analysts (such as IDC) who are bullish on the developing Windows Phone story:Windows Phone will build on the progress it made in 2012, with Nokia establishing its presence and HTC solidly jumping back into the race. Contributions by other OEMs - Samsung, ZTE, and Huawei - will help grow its footprint. With more vendors releasing more devices aimed at multiple segments, sales associates will be better positioned to tell a compelling Windows Phone story and to explain the value of Windows Phone's differentiated experience compared to market leaders Android and iOS.Source: IDC Dec 2012