Windows Phone Development Tomer Shamam Senior Architect Sela Group.

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

Christophe Peerens Windows Phone 7 Marketplace Tips and tricks When Making Your Application Mango Call To Action Q&A.
Windows Phone Codename Mango Doug Holland Sr. Architect Evangelist.
Windows Phone 7.5 Academic RoadShow Christophe Peerens Neomytic.
TouchDevelop Chapter 5-7 Chapter 5 Audio Chapter 6 Camera, Graphics and Video Chapter 7 Sensors Mengfei Ren.
Android architecture overview
Android Platform Overview (1)
Understanding Mobile App Development Concepts and Working with APIs Lesson 6.
Sascha P. Corti Developer Evangelist, Microsoft Switzerland |
runningdeactivateddormantactivated Phone resources detached Threads & timers suspended Fast App Resume Save State! State preserved! e.IsApplicationInstancePreserved.
Essentials of Developing Windows Phone Apps Chinthaka Dissanayake Tech Lead Exilesoft.
Programming with touchdevelop touchdevelop introduction Disclaimer: This document is provided “as-is”. Information and views expressed in this document,
vs. PeopleIcons SOCIAL COMMUNICATIONS ‘People-centric’ experiences merging social nets with communication HARDWARE CHOICE Range of sizes,
Windows Phone 7 Series Architecture Deep Dive Istvan Cseri Distinguished Engineer Windows Phone
Windows 8 Tips & Tricks for XAML based Windows Store App Ronnie Saurenmann Microsoft
Windows Phone
Building Windows Phone Applications with Silverlight Nguyen Thanh Tung Project Manager - MISA JSC.
Mobile Application Development
Building Windows Phone Applications with Silverlight Your Name.
7 Windows Phone 7 2. Windows Phone 7 for Business 1. About Windows Phone 7 3. Windows Phone 7 for Consumer 4. Windows Phone 7 for the Developer Welcome.
Silverlight Development Win Phone 7 Mohammed M. Melhem Senior ICT Assistant: Application Silverlight and Win Phone.
Introduction to Android Platform Overview
Windows Phone 7 and Windows Azure Development Tutorial COSC7388 Fall 2012 Huy Nguyen.
Windows Phone 7 Development Tomer Shamam Senior Architect Sela Group.
NEW WINDOWS PHONE “MANGO” APPLICATION PLATFORM SERVICES Chris blog.walshie.me SESSION CODE: WPH304 (c) 2011 Microsoft. All rights.
Khalid Siddiqui Senior Architect, Mobility Center of Excellence Microsoft Corporation SESSION CODE: WPH311.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
What’s new for Windows 8 Devs Part 3 Lewis Benge Devices & Integration Team TBWA\Digital Arts Network DEV216.
Integrate your game with Windows platform Vladimir Kolesnikov Technical Evangelist
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Wireless iPhone uses quad-band GSM, the global standard for wireless communications. It also supports Cingular’s EDGE network, b/g Wi-Fi, and Bluetooth.
Take a leap towards the most promising technology
Broad set of multitasking features Balances user experience with phone health Familiar.NET programming model.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
2 Philosophy Customer Design Experience Platform.
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
Developing Windows Phone 7 applications Igor Ralić Vedran Vučetić
Microsoft Tech Days 2012 Cheezia: Developing a Windows Phone XNA Game Rodrigo Barretto Software Engineer - MCPD on Windows Phone
The Windows Runtime (WinRT) is the shared runtime and API space used by store apps across the Windows platform (phone and client) 5 Common WinRT.
WINDOWS PHONE FIRST UP/ ALL UP Nick Randolph (Built to Roam) Dave Glover (Microsoft) SESSION CODE: #WPH202 (c) 2011 Microsoft. All rights reserved.
Ronnie Saurenmann Microsoft Switzerland
Contents : What is Silverlight? Silverlight Overview Silverlight Toolkit Overview Timeline & Packaging Silverlight V1.0 & V1.1 Properties of V1.0 Properties.
What’s Coming Next to the Windows Phone Application Platform Brandon
Silverlight 101 Ahead! If you know Silverlight and are looking for more advanced content check out : ‘Microsoft Silverlight “Media” : Moving at 60fps’
Building Windows Phone Applications with Silverlight Jaime Rodriguez
Building Windows Phone applications with Silverlight, part 2 Peter Torr Program Manager, Microsoft
Drew Lytle Principal Program Manager Microsoft Corporation SESSION CODE: WPH203.
An Introduction to Developing Applications for Microsoft Silverlight Jaime Rodriguez
Integrating with Windows Phone Hardware Jaime Rodriguez
Building Windows Phone Applications with Silverlight (Part 1) Mike Harsh Program Manager, Microsoft.
MULTI-TASKING AND APPLICATION SERVICES IN WINDOWS PHONE 7.5 Chris blog.walshie.me SESSION CODE: WPH305 (c) 2011 Microsoft. All rights.
Windows Phone Tiles and Notifications Sending alerts to your app.
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
WINDOWS PHONE 7 DEVELOPER GUIDE A guide to 3 screens and the cloud Scott Densmore Sr. Software Development Engineer Microsoft patterns & practices.
Exploring Mobile Device Networking Lesson 4. Exam Objective Matrix Skills/ConceptsMTA Exam Objectives Understanding Networking for Mobile Devices Network.
Windows Phone Development Tomer Shamam Senior Architect Sela Group.
Exploring Networked Data and Data Stores Lesson 3.
Understanding Mobile Devices, Interactions, and Tools Lesson 1.
Building Windows Phone 7 Games and Applications Yes, yes! “Games and Applications” and not “Applications and Games” Content is under NDA – please do no.
Daniel Tizon Semior Consultant, Microsoft Regional Director ANURA-SOLSTEAM Développez pour Windows Phone 7.
Introduction to Silverlight Development Pavel Yosifovich CTO, Matrix Global; Senior Instructor, Hi-Tech College
Exploring Windows Phone Features Chris Koenig | WIRELESS: softlayer - techwild.
The world’s most advanced mobile platform
Architecture of Android
The Windows Phone Application Platform
Windows Phone multitasking
TechEd /20/2018 © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Application Development A Tutorial Driven Course
Liven up your WP7 Apps with sweet “Mango” sauce
Platform for Metro style Apps
Presentation transcript:

Windows Phone Development Tomer Shamam Senior Architect Sela Group

Windows Phone Microsoft Corporation. Agenda: Windows Phone  General Concept  Metro  Software Architecture  Silverlight Capabilities  Application Model  Activation and Navigation  Application Lifecycle  User Interface  Application Bar and System Tray, Panorama, Pivot  Integration Services  Launchers and Choosers, Tiles and Push Notifications, Location and Services Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

General Concept Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

Windows Phone Microsoft Corporation. New Concept 4 DESIGN: END USER COMES FIRST PLATFORM: RICHER, DEEPER, EASIER APPS HARDWARE: FASTER TO MARKET, LESS HEAVY LIFTING

Windows Phone Microsoft Corporation. Life Maximizers

Windows Phone Microsoft Corporation. Metro UI 6

Windows Phone Microsoft Corporation. Hardware Foundation (in 7.0) Capacitive touch 4 or more contact points Sensors A-GPS, Accelerometer, Compass, Light, Proximity, Gyro (optional) 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

Windows Phone Microsoft Corporation. Two Flavors of Applications 8

Windows Phone Microsoft Corporation. Windows Phone Developer Tools 9 Windows Phone device Windows Phone Emulator Phone Emulator SamplesDocumentation GuidesCommunity Packaging and Verification Tools Tools

Windows Phone Microsoft Corporation. Deployment Process 10 Develop & Debug Submit & Validate Certify & Sign Windows Phone Application Deployment Service Marketplace

Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

Windows Phone Microsoft Corporation. Silverlight Capabilities  Inputs  Keyboard, Mouse, Touch, Ink  XAML UI Core  Common Controls, Text, Images, Data Binding, Page Navigation, Vector Graphics, Animation, Transformation, Styles and Templates  Media  Capture and Playback, VC1, WMA, MP3  Data  LINQ to Objects, LINQ to XML, Isolated Storage, XML  Base Class Library  Generics, Collections, Cryptography, Threading  Communication  REST, RSS/ATOM, SOAP 12

Windows Phone Microsoft Corporation. Multitouch  OOB Controls support touch  Translate touch events to mouse events  ScrollViewer has built-in support for pan and flick  Manipulation for all UIElements  Scale  Translate  Raw Touch, compatible with SL4  Touch Events (tap, double tap) 13

Windows Phone Microsoft Corporation. Keyboard  Silverlight TextBox integrates with the SIP (on screen keyboard)  Password has a delay  SIP supports input scoping  Key InputScopes: Text, Url, Number, Time, TelephoneNumber, NameOrAddress 14

Windows Phone Microsoft Corporation. Media 15  Media support  H/W decode  MediaStreamSource  PlayReady DRM  MediaElement Limitations  One MediaElement only  XNA sound effect API  Supports polyphonic, looping wav data

Windows Phone Microsoft Corporation. Isolated Storage  Compatible APIs with Silverlight on desktop  No quota limits  Not shared  No write access to Media Library, use XNA for that  Use for your application settings 16

Software Architecture demo

Application Model Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

Windows Phone Microsoft Corporation. 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 19

Windows Phone Microsoft Corporation. Activation and Navigation  Activation Events  Handled by the Application instance  Launching, Activated, Deactivated and Closing  Navigation Events  Handled by each PhoneApplicationPage class  OnNavigatedTo, OnNavigatedFrom, OnBackKeyPressed, OnChooserReturn, OnOrientationChanged  Controlled by  Hardware using Back and Home keys  Software using Navigation Service 20

Windows Phone Microsoft Corporation. Application Lifecycle runningdeactivateddormantactivated Phone resources detached Threads & timers suspended Fast App Resume Save State! State preserved! IsAppInstancePreserved == true Restore state! IsAppInstancePreserved == false Resuming... Tombstone the oldest app Tombstoned

Windows Phone Microsoft Corporation. Deactivation Resource Management MediaPlayer.Pause MediaElement.Pause SoundEffectInstance.Pause VibrateController.Stop PhotoCamera.Dispose Save page/global state XNA AudioPaused SensorsNotifications suppressed NetworkingCancelled SocketsDisconnected MediaElementDisconnected CameraDisposed

Windows Phone Microsoft Corporation. Activation Resource Management MediaElement.Source/Position/Play Socket.ConnectAsync new PhotoCamera/VideoCamera Restore app state if tombstoned XNA AudioResumed SensorsNotifications resumed NetworkingCompleted with Cancellation Sockets- MediaElement- Camera-

Application Model demo

Multitasking Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

Windows Phone Microsoft Corporation. Multi-tasking design principles 26 Network Conscience Battery Friendly Hardened Services Delightful and Responsive UX Never Regret App Install Integrated Feel UX Health

Windows Phone Microsoft Corporation. Multi-tasking Choices  Background Transfer Service  Background Audio  Background Agents  Periodic  Resource Intensive  Alarms and Reminders 27

Windows Phone Microsoft Corporation. Background Audio  Playback  App provides URL or stream to Zune  Audio continues to play even if app is closed  App is notified of file or buffer near completion  Phone Integration  Music & Video Hub  Universal Volume Control (UVC), launch app, controls, contextual info  Contextual launch – Start menu, UVC, Music & Video Hub  App Integration  App can retrieve playback status, progress, & metadata  Playback notification registration 28

Windows Phone Microsoft Corporation. Background Audio App Types  URL PlayList  Provide URL to play  Pause, resume, stop, skip-forward, skip-backward  Stream Source  Provide audio buffers  Custom decryption, decompression  Requires app to run some code in background 29

Background Audio demo

Windows Phone Microsoft Corporation. Background Agents  Background Agent  Allows an application to execute code in the background  Two types of background processing scenarios: tasks: Periodic and Resource Intensive  Application may have only one background agent  Initialized in foreground, run in background  Persisted across reboots  Scheduled Tasks  Periodic task runs regularly for a small amount of time  Resource Intensive task runs occasionally and is allowed to use substantial device resources  User control through CPL  System maximum of 18 periodic agents  Agent runs for up to 14 days (can be renewed) 31

Windows Phone Microsoft Corporation. Agent Types 32 Periodic  Occurrence  Every 30 min, non battery saver  Duration  ~15 seconds  Memory Constraints  <= 5 MB Memory Resource Intensive  Occurrence  External power or battery > 90%, screen lock, no-call, no-cell  Duration  10 minutes  Memory Constraints  <= 5 MB Memory All of this requirements can change before RTM, but should not change too much

Windows Phone Microsoft Corporation. Background Agent Functionality 33 Allowed  Tiles  Toast  Location  Network  R/W ISO store  Sockets  Most framework APIs Restricted  Display UI  XNA libraries  Microphone and Camera  Sensors  Play audio

Background Agent demo

Windows Phone Microsoft Corporation. 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 35

Windows Phone Microsoft Corporation. Code Sample: Background Transfer 36 using Microsoft.Phone.BackgroundTransfer; 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); }

Windows Phone Microsoft Corporation. Notifications  Time-based, on-phone notifications  Supports Alerts & Reminders  Persist across reboots  Adheres to user settings  Consistent with phone UX 37

Windows Phone Microsoft Corporation. Alarms vs Reminders? Alarms Modal Snooze and Dismiss Sound customization No app invocation No stacking Reminders Rich information Integrates with other reminders Snooze and Dismiss Launch app Follows the phones global settings 38

Windows Phone Microsoft Corporation. Code Sample: Alarms 39 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); }

Windows Phone Microsoft Corporation. Code Sample: Reminders 40 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

UI Model Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

Windows Phone Microsoft Corporation. Application Bar and System Tray  System Tray  No integration, but does affect Layout  Show:Hide using SystemTray.IsVisible  Application Bar  Up to 4 Buttons  Menu Items (Recommended 6)  Toggle Visibility .ApplicationBar.IsVisible 42

Windows Phone Microsoft Corporation. Panorama 43  Part of the native Windows Phone look and feel  Panorama is a long horizontal canvas  PanoramaItem serves as a container that hosts other content and controls

Windows Phone Microsoft Corporation. Pivot 44  Provides a quick way to manage views or pages  Pivot is a container of pivot items  PivotItem contain individual page content such as controls, grids, or links

Windows Phone Microsoft Corporation. Many more…  Standard Controls  Buttons, Image, Layout, ListBox, TextBox, Slider, Other…  Bing Maps  Bing Map Control, Integration with Bing Maps Services  Deep Zoom  Included in core run-time, Optimized to take advantage of GPU, Consumes same content as SL on desktop, Supported for Online content  Web Browser  Displays network and local content, Supports pan, double tap and pinch to zoom, Supports transforms & projections, Application can interact with javascript 45

UI Model demo

Integration Services Software Architecture App Model Cloud and Integration Services Hardware Foundation UI Model

Windows Phone Microsoft Corporation. Launchers & Choosers  Enable applications to provide a set of common phone tasks to their users  Launchers let you fire and forget  SMS, , Web Browser, Dialer, Search, etc.  Choosers let you fire and pick the results back  Picture, Camera, Contact, etc. 48

Launchers & Choosers demo

Windows Phone Microsoft Corporation. Push Notifications 50

Windows Phone Microsoft Corporation. Types of Push Notifications  Tile notifications  Update tile count, title and background image  Update back tile title, content and image  Toast/Deep Toast notifications  Display a on-top-like message  Take users directly to an application experience  Uses standard SL navigation (OnNavigatedTo)  Raw notifications  Can be used in application logic 51

Windows Phone Microsoft Corporation. Push Notifications (Core) Enhancements Reliability New TDET mechanism for broader network compatibility Lowered polling interval for non- persistent connection friendly networks Efficiency TLS resume for sessions within 8 hours Hints for improved radio dormancy Concurrent tile downloads for less radio uptime Performance Faster state machine for faster client service Smarter queue logic for less redundancy 52

Windows Phone Microsoft Corporation. Live Tile  Local Tile APIs  Full control of ALL properties  Multiple tiles per app  Create,Update/Delete/Query  Launches direct to Uri 53

Windows Phone Microsoft Corporation.  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

Windows Phone Microsoft Corporation. Location and Services  The service obtains location data from multiple sources such as GPS, Wi-Fi, and cellular  Applications can access location information  Allows you to create location- aware applications 55

Windows Phone Microsoft Corporation. Accelerometer  Measures force applied on each axis over time  Determine in which direction the user is moving the device  Expressed as a 3-dimensional vector 56 +Y -Y +X -X +Z -Z

Windows Phone Microsoft Corporation.  Measures rotational velocity on 3 axis  Significant drift  Indicates rotation even when device is stationary  Availability:  Optional on Mango phones  Not present in pre-Mango WP7 phones 57 Gyroscope

Windows Phone Microsoft Corporation. Code Sample: Gyroscope 58

Windows Phone Microsoft Corporation.  Gives 3D heading of Earth’s magnetic and Geographic North  Subject to external electromagnetic influences  Requires user calibration over time  Great inaccuracies in orientation, up to 20 degrees  Significant lag  Availability:  Optional on “Mango” phones  Included in some pre-Mango WP7 phones 59 Compass (aka Magnetometer)

Windows Phone Microsoft Corporation.  Accelerometer required on all devices  Gyro and Compass sensors are optional Application should leverage sensors based on device capabilities 60 Sensor Hardware Availability

Windows Phone Microsoft Corporation.  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 61 Motion Sensor Always prefer Motion Sensor when available

Windows Phone Microsoft Corporation.  Degraded modes have lower quality approximations  When Motion.IsSupported is false, apps should use accelerometer or other input and control mechanisms 62 Motion Sensor Adapts to Devices AccelerometerCompassGyroMotion Yes Full Yes NoDegraded YesNoYesUnsupported YesNo Unsupported

Windows Phone Microsoft Corporation. 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 63

Windows Phone Microsoft Corporation. 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 64

Windows Phone Microsoft Corporation. Sockets Classes in Mango AreaSilverlight 4.0Windows Phone TCP SocketsSocket class (Async)Socket UDP SocketsUdpAnySourceMulticastClient UdpSingleSourceMulticastClient Socket AddressingSocketAddress IPAddress IPEndPoint SocketAddress IPAddress IPEndPoint Name Resolution DnsEndPoint NameResolution APIs

Windows Phone Microsoft Corporation. Code Sample: TCP Socket 66 _endPoint = new DnsEndPoint(“ ", 5000); _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); SocketAsyncEventArgs args = new SocketAsyncEventArgs(); args.UserToken = _socket; args.RemoteEndPoint = _endPoint; args.Completed += new EventHandler (OnSocketConnectCompleted); _socket.ConnectAsync(args);

Windows Phone Microsoft Corporation. Code Sample: UDP Socket 67 Client = new UdpAnySourceMulticastClient(address, port); Client.BeginJoinGroup( result => { Client.EndJoinGroup(result); Dispatcher.BeginInvoke( delegate { OnAfterOpen(); Receive(); }); }, null);

Windows Phone Microsoft Corporation. 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 68

Windows Phone Microsoft Corporation. Local database  SQL Compact Edition  Object Model for CRUD  LINQ to SQL to query, filter, sort  Application scope  Uses IsolatedStorage  DatabaseSchemaUpdater APIs for upgrades 69

Local database demo

Windows Phone Microsoft Corporation. Register Your Device 71  Test on a physical device  Register your device  Install, run, and debug unsigned applications  Use Zune to register your device

Questions? 72