Timeline of Windows Phone - Microsoft Corporation: Software

50
Microsoft Thailand Limited Pongsakorn Poosankam Microsoft Innovation Center Manager THAILAND Mango Mango! Developing for Windows Phone 7 http://www.fb.com/groups/wpthaidev/

Transcript of Timeline of Windows Phone - Microsoft Corporation: Software

Page 1: Timeline of Windows Phone - Microsoft Corporation: Software

Microsoft Thailand Limited

Pongsakorn Poosankam Microsoft Innovation Center Manager

THAILAND

Mango Mango!

Developing

for Windows

Phone 7

http://www.fb.com/groups/wpthaidev/

Page 2: Timeline of Windows Phone - Microsoft Corporation: Software

Timeline of Windows Phone Date Change

Feb 2010 WP7 official unveiled (WMC 2010)

Apr 2010 Developer tools announced (MIX2010)

Oct 2010 Launched in Europe

Nov 2010 Launched in North America

Feb 2011 Partnership with Nokia Announced

Mar 2011 “No-Do”, Minor Update , Copy and Past

Nov 2011 “Mango”, 7.5 Major Update

Software Foundation

App Model

Cloud and Integration

Services

Hardware Foundation

UI Model

Page 3: Timeline of Windows Phone - Microsoft Corporation: Software

List of Windows Phone Devices

Page 4: Timeline of Windows Phone - Microsoft Corporation: Software

Software Foundation

App Model

Cloud and Integration

Services

Hardware Foundation

UI Model

Hardware Foundation

Page 5: Timeline of Windows Phone - Microsoft Corporation: Software

Hardware Foundation Updates

Capacitive touch 4 or more contact points

Sensors A-GPS, Accelerometer, Compass, Light, Proximity,

Camera 5 mega pixels or more

Multimedia Common detailed specs, Codec acceleration

Memory 256MB RAM or more, 8GB Flash or more

GPU DirectX 9 acceleration

CPU Qualcomm MSM8x55 800Mhz or higher

Hardware buttons | Back, Start, Search

Gyro

MSM7x30

Camera

Motion Sensor

Improved capability detection APIs

Page 6: Timeline of Windows Phone - Microsoft Corporation: Software

Measures resultant acceleration (force) on device

Pros:

Available on all devices

Cons:

Difficult to tell apart small orientation changes from small device motions

6

Accelerometer

+Y

+X -X -Z

Page 7: Timeline of Windows Phone - Microsoft Corporation: Software

Camera

Access to live camera stream

PhotoCamera

Silverlight 4 Webcam

Display in your app

Video Brush

Page 8: Timeline of Windows Phone - Microsoft Corporation: Software

When to use each approach

PhotoCamera

Take High Quality Photos

Handle Hardware Button

Handle Flash mode and

Focus

Access Samples (Pull

Model)

Webcam

Record Video

Record Audio

Share code with desktop

Access Samples (Push

Model)

Page 9: Timeline of Windows Phone - Microsoft Corporation: Software

Camera Demo

Page 10: Timeline of Windows Phone - Microsoft Corporation: Software

Measures rotational velocity

on 3 axis

Optional on Mango phones

Not present in pre-Mango

WP7 phones

1

0

Gyroscope

Page 11: Timeline of Windows Phone - Microsoft Corporation: Software

11

Gyroscope API

Page 12: Timeline of Windows Phone - Microsoft Corporation: Software

Virtual sensor, combines gyro + compass +

accelerometer

Motion Sensor vs. gyro or compass or

accelerometer

More accurate

Faster response times

Comparatively low drift

Can disambiguate motion types

Has fall-back if gyro is not available

1

2

Motion Sensor

Always prefer Motion Sensor when available

Page 13: Timeline of Windows Phone - Microsoft Corporation: Software

Motion API

if (Motion.IsSupported) { _sensor = new Motion(); _sensor.CurrentValueChanged += new EventHandler<SensorReadingEventArgs<MotionReading>> (sensor_CurrentValueChanged); _sensor.Start(); } void _sensor_CurrentValueChanged(object sender, SensorReadingEventArgs<MotionReading> e) { Simple3DVector rawAcceleration = new Simple3DVector( e.SensorReading.Gravity.Acceleration.X, e.SensorReading.Gravity.Acceleration.Y, e.SensorReading.Gravity.Acceleration.Z); … }

Page 14: Timeline of Windows Phone - Microsoft Corporation: Software

Degraded modes have lower quality approximations

When Motion.IsSupported is false, apps should use accelerometer or other input and control mechanisms

1

4

Motion Sensor Adapts to Devices

Accelerometer Compass Gyro Motion

Yes Yes Yes Full

Yes Yes No Degraded

Yes No Yes Unsupported

Yes No No Unsupported

Page 15: Timeline of Windows Phone - Microsoft Corporation: Software

Sensor Calibration

Calibration Event is fired when calibration is

needed

Both Compass and Motion sensors need user

calibration

Apps should handle it

Provide UI asking user to move device through a full

range of orientations

Not handling will cause inaccurate readings

We are considering providing copy & paste solution

Page 16: Timeline of Windows Phone - Microsoft Corporation: Software

Accelerometer Simulator

GPS Simulator

Demo

Page 17: Timeline of Windows Phone - Microsoft Corporation: Software

Software Foundation

App Model

Cloud and Integration

Services

Hardware Foundation

UI Model

Software Foundation

Page 18: Timeline of Windows Phone - Microsoft Corporation: Software

Run-time improvements

Silverlight 4

• Implicit styles

• RichTextBox

• ViewBox

• More touch events (tap, double tap)

Features

• Sockets

• Clipboard

• IME

• WebBrowser (IE9)

• VideoBrush

Performance

• Gen GC

• Input thread

• Working set

• Profiler

Page 19: Timeline of Windows Phone - Microsoft Corporation: Software

Networking Sockets

TCP

UDP unicast, Multicast ( on Wi-Fi)

Connection Manager Control

Overrides and sets preferences (e.g. Wi-Fi or cellular only)

HTTP

Full header access

WebClient returns in originating thread

Page 20: Timeline of Windows Phone - Microsoft Corporation: Software

Silverlight and XNA Shared Graphics

XNA inside Silverlight App

Integration at Page Level

XNA takes over rendering

Integration at Element level

Silverlight elements in XNA

pipeline via UIElementRenderer

Shared input

Page 21: Timeline of Windows Phone - Microsoft Corporation: Software

Silverlight + XNA demo

Page 22: Timeline of Windows Phone - Microsoft Corporation: Software

Local database

SQL Compact Edition

Use object model for CRUD

LINQ to SQL to query, filter, sort

Application level access

Sandboxed from other apps

Uses IsolatedStorage

Access for background agents

DatabaseSchemaUpdater APIs for upgrades

SQL CE

Page 23: Timeline of Windows Phone - Microsoft Corporation: Software

Database APIs: Datacontext and attributes // Define the data context.

public partial class WineDataContext : DataContext

{

public Table<Wine> Wines;

public Table<Vineyard> Vineyards;

public WineDataContext(string connection) : base(connection) { }

}

// Define the tables in the database

[Table]

public class Wine

{

[Column(IsPrimaryKey=true]

public string WineID { get; set; }

[Column]

public string Name { get; set; }

……

}

// Create the database form data context, using a connection string

DataContext db = new WineDataContext("isostore:/wineDB.sdf");

if (!db.DatabaseExists()) db.CreateDatabase();

Page 24: Timeline of Windows Phone - Microsoft Corporation: Software

Queries: Examples // Find all wines currently at home, ordered by date acquired var q = from w in db.Wines where w.Varietal.Name == “Shiraz” && w.IsAtHome == true orderby w.DateAcquired select w; Wine newWine = new Wine {

WineID = “1768", Name = “Windows Phone Syrah", Description = “Bold and spicy"

}; db.Wines.InsertOnSubmit(newWine); db.SubmitChanges();

Page 25: Timeline of Windows Phone - Microsoft Corporation: Software

Local database demo

Page 26: Timeline of Windows Phone - Microsoft Corporation: Software

Software Foundation

App Model

Cloud and Integration

Services

Hardware Foundation

UI Model

Application Model

Page 27: Timeline of Windows Phone - Microsoft Corporation: Software

Fast Application Resume

Immediate Resume of recently used applications

Apps stay in memory after deactivation

New “task switcher”

Long-press back button

While dormant

Apps are not getting CPU cycles

Resources are detached

You must recompile and resubmit targeting Mango

Page 28: Timeline of Windows Phone - Microsoft Corporation: Software

Fast App Resume demo

Page 29: Timeline of Windows Phone - Microsoft Corporation: Software

Multi-tasking Options

Background Transfer Service

Background Audio

Background Agents

Periodic

On Idle

Alarms and Reminders

29

Page 30: Timeline of Windows Phone - Microsoft Corporation: Software

Generic Agent Types

Periodic Agents Occurrence

Every 30 min

Duration

~15 seconds

Constraints

<= 6 MB Memory

<=10% CPU

On Idle Agents Occurrence

External power, non-cell network

Duration

10 minutes

Constraints

<= 6 MB Memory

Page 31: Timeline of Windows Phone - Microsoft Corporation: Software

Background Agent Functionality

Allowed

Tiles Toast Location Network R/W ISO store Sockets Most framework APIs

Restricted

Display UI XNA libraries Microphone and Camera Sensors Play audio

(may only use background audio APIs)

Page 32: Timeline of Windows Phone - Microsoft Corporation: Software

Notifications

Time-based, on-phone notifications

Supports Alerts & Reminders

Persist across reboots

Adheres to user settings

Consistent with phone UX

Page 33: Timeline of Windows Phone - Microsoft Corporation: Software

Alarms API

35

Alarms using Microsoft.Phone.Scheduler; private void AddAlarm(object sender, RoutedEventArgs e) { Alarm alarm = new Alarm("Long Day"); alarm.BeginTime = DateTime.Now.AddSeconds(15); alarm.Content = "It's been a long day. Go to bed."; alarm.Title = "Alarm"; ScheduledActionService.Add(alarm); }

Page 34: Timeline of Windows Phone - Microsoft Corporation: Software

Reminders API

36

using Microsoft.Phone.Scheduler; private void AddReminder(object sender, RoutedEventArgs e) { Reminder reminder = new Reminder("CompanyMeeting"); reminder.BeginTime = DateTime.Now.AddSeconds(15); reminder.Content = "Soccer Fields by The Commons"; reminder.Title = "Microsoft Annual Company Product Fair 2009"; reminder.RecurrenceType = RecurrenceInterval.Yearly; reminder.NavigationUri = new Uri("/Reminder.xaml", UriKind.Relative); ScheduledActionService.Add(reminder); }

Reminders

Page 35: Timeline of Windows Phone - Microsoft Corporation: Software

Background Transfer Service

Start transfer in foreground, complete in background, even if app is closed

Queue persists across reboots

Queue size limit = 5

Queue APIs (Add, Remove, Query status)

Single service for many apps, FIFO

Download ~20 MB ( > over Wi-Fi)

Upload Size ~4 MB (limit to come)

Transfers to Isolated Storage

Page 36: Timeline of Windows Phone - Microsoft Corporation: Software

Background Transfer Service

API

void DownloadWithBTS(Uri sourceUri, Uri destinationPath) { btr = new BackgroundTransferRequest(sourceUri, destinationUri); btr.TransferStatusChanged += BtsStatusChanged; btr.TransferProgressChanged += BtsProgressChanged; BackgroundTransferService.Add(btr); }

void BtsProgressChanged(object sender, BackgroundTransferEventArgs e) { DrawProgressBar(e.Request.BytesReceived); }

using Microsoft.Phone.BackgroundTransfer;

Page 37: Timeline of Windows Phone - Microsoft Corporation: Software

Software Foundation

App Model

Cloud and Integration

Services

Hardware Foundation

UI Model

Cloud and Integration Services

Page 38: Timeline of Windows Phone - Microsoft Corporation: Software

Live Tile improvements

Local Tile APIs

Full control of ALL properties

Multiple tiles per app

Create,Update/Delete/Query

Launches direct to Uri

Page 39: Timeline of Windows Phone - Microsoft Corporation: Software

Back of tile updates

Full control of all properties when your app is in the foreground or background

Content, Title, Background

Flips from front to back at random interval

Smart logic to make flips asynchronous

Live Tiles – Local Tile API

Continued…

Title

Content

Title

Background Content string is bigger

Page 40: Timeline of Windows Phone - Microsoft Corporation: Software

Live tiles demo

Page 41: Timeline of Windows Phone - Microsoft Corporation: Software

Push Notifications (Core) Enhancements

Reliability

• New TDET

mechanism

for broader

network

compatibility

Efficiency

• Concurrent

tile

downloads

for less

radio uptime

Performance

• Faster state

machine for

faster client

service

• Smarter

queue logic

for less

redundancy

Page 42: Timeline of Windows Phone - Microsoft Corporation: Software

New Choosers and Launchers

SaveRingtoneTask

AddressChooseTask

BingMapsTask

BingMapsDirectionsTask

GameInviteTask

Updates:

EmailAddressChooserTask

PhoneNumberChooserTask

Page 43: Timeline of Windows Phone - Microsoft Corporation: Software

http://watwp.codeplex.com

Can do.

Microsoft Push

Apple Push

Storage (Tables, Blobs and Queues)

SQL Azure

Computation

Can do.

OCR in The Cloud

Speech to Text in The Cloud

Identification

Mapping

http://research.microsoft.com/en-us/um/redmond/projects/hawaii/

English to Thai Dictionary

from Thai Software Enterprise

use OCR in the Cloud.

Page 44: Timeline of Windows Phone - Microsoft Corporation: Software

Announcing 4 New Global Publishers

Helping more developers from more countries Unlock Phones

Submit apps to Marketplace

Who Where How

App Port 13 countries in East Asia http://www.app-exchange.com

APPA Market 19 countries in Central Europe http://appamarket.com

Device7 China http://www.device7.com

MTel China http://wp.mtelnet.com

Yalla Apps 69 countries in Middle East and Africa

(Included Thailand) http://www.yallaapps.com

Page 45: Timeline of Windows Phone - Microsoft Corporation: Software

Marketplace Distribution Options

“Beta” Private Public

Number of users 100 (1) unlimited unlimited

App Price Must be “free” Can be “paid” Can be “paid”

Time Limited Yes, expires after 90d No No

Updateable No Yes Yes

Certification Required No Yes Yes

Publicly Discoverable No No (2) Yes

Access Control Yes, limited to test

user WLIDs provided

No No

Target Users Beta users Private Users Public Users

Page 46: Timeline of Windows Phone - Microsoft Corporation: Software

The Marketplace Test Kit

The Marketplace Test Kit lets you perform the same tests on your application before you submit it

Vastly improves chances of the application passing first time

50

Page 47: Timeline of Windows Phone - Microsoft Corporation: Software

MyDolls – Developed by Students

51

3rd Student from Com. Sci., Chulalongkorn University

Top Paid in “Social” Category

$0.99

Page 48: Timeline of Windows Phone - Microsoft Corporation: Software

How to submit app via publisher.

Register at www.yallaapps.com with Thai developer, and submit by yourself. ($99 for register)

For Paid App and Free App

Or, Send your XAP file and Description to Me.

Free, no charge

Free App Only

1-2 Weeks for approval

See more detail : http://micthailand.net or http://bit.ly/yKU5nw

Page 50: Timeline of Windows Phone - Microsoft Corporation: Software

Microsoft Thailand Limited

Pongsakorn Poosankam Microsoft Innovation Center Manager

THAILAND

Thank you.

Q&A

http://www.fb.com/groups/wpthaidev/