developing for windows phone 8.1 (dan ardelean)

57
Premium community conference on Microsoft technologies itcampro @ itcamp14 # Developing for Windows Phone 8.1 Dan Ardelean MVP Client Development Nokia Developer Champion [email protected] @danardelean

Upload: itcamp

Post on 13-May-2015

430 views

Category:

Technology


1 download

DESCRIPTION

In this session we will have a look at all the new features brought by the Windows Phone 8.1 SDK and more important on how to design your applications to share the source code with the Windows Store applications. In this session we will have a look at all the new features brought by the Windows Phone 8.1 SDK and more important on how to design your applications to share the source code with the Windows Store applications.

TRANSCRIPT

Page 1: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Developing for Windows Phone 8.1

Dan ArdeleanMVP Client Development

Nokia Developer [email protected]

@danardelean

Page 2: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Huge thanks to our sponsors & partners!

Page 3: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

• Windows Phone 8.1

• Windows Phone 8.1 Developer Platform

• New features for developers

• Getting Started

• Developer Choices

AGENDA

Page 4: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

WINDOWS PHONE 8.1

Page 6: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Start screen: More tiles More personal

Page 7: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Cortana: Your PERSONAL Digital Assistant

Page 8: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Many New Features for Users

Page 9: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

2014: Windows Phone 8.1 Hardware

Decrease HW cost floor (support 8x26, Qualcomm Reference Design)

Dual-SIM support

Apps to help you get more out of your data plan: DataSense 2.0, Wi-Fi Sense,

Storage Sense, Battery Sense

Page 10: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Getting Windows Phone 8.1

http://dev.windowsphone.com

http://appstudio.windowsphone.com

Page 11: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Windows Phone 8.1 Preview for Developers

Page 12: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

WINDOWS PHONE 8.1 DEVELOPER PLATFORM

Page 13: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

One Windows

Apps come to life on Windows

• Live tile improvements

• Action Center for smart notifications

• Background execution + triggers

• Bluetooth-LE support for wearables

• Internet Explorer 11 improvements

Designed once; engaging everywhere

• Converged developer platform

• Converged app model

• Shared app identities + entitlement

• Unified push services (via WNS)

Page 14: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Convergence

Windows Phone 7.5 Windows Phone 8.0

Convergence Begins with IE

• WP 7.5 shipped with IE9

• Same rendering engine as Windows

• Same JavaScript engine as Windows

Converged Core (NT kernel)

• Common kernel & file system

• Kernel mode driver framework

• Secure boot & storage encryption (BitLocker)

• Core networking stack

Developer Platform

• Partial API convergence (focus on sensors & IAP)

• Native Code (C++) and DirectX

• IE10

Converging the Dev Platform

• More skillset reuse

• More code reuse

• More seamless app experiences

Aligning the Stores

• Shared dev registration

• Shared entitlement

Common Core Platform

• Proximity & Location

• Security & identity

• Task scheduler

Page 15: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

API Convergence Windows Runtime (WinRT)

Dramatic convergence in 8.1• Goal is 100% convergence for dev scenarios

• In 8.0, we had ~30% API convergence

• With 8.1, we move well past 90%+

convergence

Page 16: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Windows Developer Platform in 8.1

| |

Legend

Page 17: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Programming Models

Page 18: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

BUILDING A SHARED WINDOWS PHONE & STORE APP

DEMO

Page 19: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

NEW FEATURES FOR DEVELOPERS IN WINDOWS PHONE 8.1

Page 20: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Converged Windows XAML Apps

• One Visual Studio ‘Universal app’ project template for your app

• Shared dev and test tooling for both platforms

Page 21: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Windows Phone app using JavaScript & HTML

Page 22: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Common canvas for Screen Diversity

10” tablet

7” tablet

6”

5”

4.5”

Infinite virtual canvas

166 Logical DPI

Page 23: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

View Pixels

12:38

width

hei

ght

“raw” pixels

12:38

width

hei

ght

“view” pixels

divide byscale factor

Page 24: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Scale Factor

12:38

width (inch)

pixels

scale factor = pixels / width x platform constant

scale factor minimum of 1.0, rounded to nearest 0.2

platform constant depends on viewing distance of device (phone/tablet/PC)

Page 25: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

View Pixels

12:38

540

96

0

5.5”12:38

5.5”

720

12

80

12:38

5.5”

1080

19

20

450

80

0

“view” pixels

Page 26: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Emulator support

Page 27: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Converged Controls

80% exact same XAML 20% custom

Common SignatureButton

CheckBox

RadioButton ProgressBar

Slider

ToggleSwitchHub

Pivot

ListView

GridView

Page 28: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Tailoring UI to each platform

On Windows Phone 8.1 … and on Windows 8.1

Page 29: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Animations

Signature Phone animations built in– Page Navigation

– PointerDown/Up (Tilt)

– Page Rotation

– Escalator for MenuFlyout (context menu)

– Readerboard

ThemeTransitions / ThemeAnimations– Same API as on Windows

– Key animations updated to match Phone UX

Page 30: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Multitasking: Background tasks and Triggers

Task

TimeTriggerPUSH

Notification

LocationTrigger

PushNotificationTrigger

MaintenanceTrigger

InternetAvailable NetworkStateChange

TimeZoneChange

Page 31: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Shared Tiles and Notification Services

Windows Notification Service (WNS)

• Shared push service for Windows + Phone

• Improved queuing to limit lost

notifications due to intermittent network

connectivity

Tile templates + toasts

• Shared tile templates (more!)

• Periodic tile updates

• Toasts

Page 32: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Action Center

Action Center– Central location to surface missed

notifications

– Apps can intelligently manage notifications (silently add, update, and delete notifications)

Page 33: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Data Roaming and Data Backup

Device B

WP 8.1 – PFN 12345

Roaming LocalLocalCache

Temp

Device A

WP 8.1 App

Roaming LocalLocalCache

Temp

Backup [Device A]

• Local– Primary local store

– Can be backed up to users’ OneDrive

• Roaming– Data roamed cross-device

– Limited to 100kb

• Temp– Temporary storage

– Cleaned up in low storage condition

Page 34: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Share Contract

Page 35: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Maps and Geofencing

Page 36: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Media, Media Editing and Background Audio

Page 37: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Bluetooth LEHeart rate monitors and other sensors

Proximity detectors (Key finder)

Developers can use the Bluetooth GATT APIs to access Bluetooth LE services, descriptors, and characteristics

Bluetooth RFCommConnect, host, and communicate with Bluetooth RFCOMM device services

Devices using Serial Port Profile (SPP) are supported

Client and server Service Discovery Protocol (SDP)

Background Tasks and TriggersApp can receive Bluetooth data when its running in the background

Launch when a Bluetooth event occurs

Bluetooth

Page 38: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

DEMO BLE – HEART RATE MONITOR

Page 39: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Enterprise Enhancements

Mobile device management (MDM)

More policy support

Client Certificate authentication

Convergence with Windows cryptography APIs

Wi-Fi & VPN

S/MIME

Application management

Page 40: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Identity, identification, SSO

Microsoft Account SSO

Web Authentication Broker (WAB)

Authenticate to online service providers over Oauth

SSO mode enables user to completely bypass log-in page

Simple API

CredentialLocker

Windows.Security.Credentials APIs to store credentials (user name, password) securely

Isolation: Apps can only access their own credentials

Credentials roam across trusted devices (works for WAB and IE too!)

Page 41: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Better HTML5 support

Ability to code pinning behavior• Specify high-resolution site icons

• Live tiles using notifications

Professional quality video• Adaptive streaming

• Secure viewing

• Accessibility improvements

WebGL supportWeb spec based on OpenGL ES 2.0, to enable use of low-level 3D graphics APIs on web sites and HTML-based apps

Rich user interactions• Screen + device orientation APIs

• Pre-fetch and pre-render

Page 42: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

SDK Emulator improvments

Hyper-V based emulator improvements:

Network

Multi-touch emulation with mouse

SD card

Location improvements

Push simulation

Locally simulate push notifications

Save and load data samples

Page 43: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Windows Phone Power Tools

AppVerifierFind resource leaks and vulnerabilities in native apps

Performance MonitorReal time diagnostics

Performance RecorderETW trace capturing

Page 44: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

And more

Page 45: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

GETTING STARTED

Page 46: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Windows Dev Center

Page 47: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

The tools

http://dev.windows.com http://dev.windowsphone.com

Page 48: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

PC Requirments

Supported operating systems Windows 8.1 (x86 or x64)

Hardware4 GB of free disk space1.5 GB of RAM (recommended)64-bit (x64) motherboard

To use the Windows Phone Emulators

Windows 8.1 Pro or higher (for Hyper-V) and Second Level Address Translation (SLAT)Min 4GB RAM

Page 49: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Windows Developer Account

Page 50: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

DEVELOPER CHOICES

Page 51: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Programming Models

Page 52: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Application Lifecycle: Silverlight vs WinRT

Tombstoned

Not running

Running

LaunchingClosing

DeactivatingActivating

Dormant

Not running

Running

OnLaunched

SuspendingResuming

Suspended

Page 53: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Choices

Approach Pros & Cons

Keep using Silverlight 7.x/8

(Windows Phone 8 platform)

Pros Will run on Windows Phone 8.1 (app compatibility), still runs

on earlier Windows Phone devices

Cons Will not take advantage of new platform capabilities

Will not enable targeting of Windows

Use Silverlight 8.1

(Move Silverlight app into new

execution stack and app

package)

Pros Enables existing Silverlight apps to take advantage of nearly

all new APIs and platform capabilities

Cons Will not enable targeting of Windows

Will not run on Windows Phone 8 devices

Use Windows XAML platform

Pros

Enables targeting of Windows and Windows Phone

Takes full advantage of new APIs and platform capabilities

Better performance & reduced memory use

Cons Will not run on Windows Phone 8 devices

Page 54: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Silverlight Only

Page 55: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Upgrade Silverlight 8.0 to 8.1

Page 56: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

WINDOWS PHONE 8.1 PRINCIPLES

Primary features:

Existing Windows Phone 8 apps run flawlessly

Windows Runtime XAML platform and HTML/WinJS support brings convergence

with Windows 8.1, and is faster and uses less memory than Silverlight

The core of an app can be built once for Windows and Windows Phone; you can

share elements of UI, though it’s best to tailor the user experience for each

platform

Convergence is not just in the developer platform: it spans tools, store, commerce

Developer investment in the existing Silverlight platform is protected: Existing

Silverlight apps can be upgraded to access new Windows Phone 8.1 platform

capabilities

Page 57: Developing for Windows Phone 8.1 (Dan Ardelean)

Premium community conference on Microsoft technologies itcampro@ itcamp14#

Q & A