Windows Phone 7.5 Academic RoadShow Christophe Peerens Neomytic.

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.
Building RADNUG8 – the windows 8 app Part 1 Matt
Mobile Application Development Fall COP 4655 U1 T/R 5:00 - 6:15pm – ECS 135 Steve Luis lecture1.
Mobile Applications Development. Your next job: Mobile app developer? pp_developer_?taxonomyId=11&pageNumber=1.
Creating Games For Windows, Xbox 360, and Windows Phone 7 Ryan Plemons
Understanding Mobile App Development Concepts and Working with APIs Lesson 6.
Windows Phone 8.1 for Developers Sascha Corti Technical Evangelist, Microsoft Switzerland | techpreacher.corti.com
Windows 8 Introduction Mark Rosenberg Development Instructor New Horizons.
Technical Workshops | Esri International User Conference San Diego, California Building Applications with ArcGIS Runtime SDK for Windows Phone Rex Hansen.
Programming with touchdevelop touchdevelop introduction Disclaimer: This document is provided “as-is”. Information and views expressed in this document,
Windows Phone Doug Holland Senior Architect Evangelist 9/28/2011.
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
Building Windows Phone Applications with Silverlight Nguyen Thanh Tung Project Manager - MISA JSC.
Mobile Application Development
Getting Started with Windows Phone 7.0 Development Creating a Silverlight Application Sergey Barskiy
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.
An introduction to. Introductions  I’m Rob Fonseca-Ensor  A Solution Architect at Infusion  I run the Canary Wharf.NET User Group  I blog at
Silverlight Development Win Phone 7 Mohammed M. Melhem Senior ICT Assistant: Application Silverlight and Win Phone.
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.
Take a leap towards the most promising technology
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
Broad set of multitasking features Balances user experience with phone health Familiar.NET programming model.
2 Philosophy Customer Design Experience Platform.
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
Join the MVA Community! ▪ Microsoft Virtual Academy—Free online training! ‒ Tailored for IT Pros and Developers ‒ Over 1M registered users ▪ Earn while.
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.
Storage SD CardData Enhancements (Data.XML) Device Discovery (Devices.Enumeration)Graphics Enhancements D2D/Dwrite (Win32) Streams (Input/Output/RandomAccess…)Sensors.
WINDOWS PHONE FIRST UP/ ALL UP Nick Randolph (Built to Roam) Dave Glover (Microsoft) SESSION CODE: #WPH202 (c) 2011 Microsoft. All rights reserved.
2014 Defense Health Information Technology Symposium – Meeting Mobile App 1. Download the DHA Events App to your device. This can be found in the AppStore.
CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved.
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
WINDOWS PHONE 7.5 “MANGO” ADVANCED Laurent Bugnion Director of UX Integration IdentityMine
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’
Tim Program Manager, Developer Platform
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.
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 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.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Windows App Studio.
Exploring Networked Data and Data Stores Lesson 3.
Understanding Mobile Devices, Interactions, and Tools Lesson 1.
THE SOURCE OF 4 TH & MAYOR: CODE, HACKS, TRICKS Jeff Wilcox Senior Software Development Engineer Microsoft SESSION CODE: WPH308 (c) 2011 Microsoft. All.
Building Windows Phone 7 Games and Applications Yes, yes! “Games and Applications” and not “Applications and Games” Content is under NDA – please do no.
Building Windows 8 App.
Application area Events Conferences Exhibitions
The world’s most advanced mobile platform
The Windows Phone Application Platform
TechEd /6/2018 © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows Phone Platform Integration Yochay Kiriaty
Module 1.1 Introduction to computers
MonoGame and Windows 8.
Windows Phone 8 Application Model
Windows Phone multitasking
Introduction to mobile app development Module 3 – Improving your App Studio app Lance McCarthy.
Information Technology Services
TechEd /20/2018 © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Tooling and Diagnostics
Application Development A Tutorial Driven Course
Liven up your WP7 Apps with sweet “Mango” sauce
What’s new for Silverlight & XNA developers in Windows Phone Mango
Build /23/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
4/9/ | Contracts © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Presentation transcript:

Windows Phone 7.5 Academic RoadShow Christophe Peerens Neomytic

Student Developer Competition 11 Windows Phone to Win From 1 October to 31 October Publish 3 Application for Windows Phone on the Marketplace More information on the Microsoft Academic Blog –

Student Developer Competition : How to Download the free tools – create.msdn.com (App Hub) create.msdn.com Develop your App Test your App – Your Teacher will receive 1 Windows Phone. Submit your App – Free for Student through your DreamSpark account (

Stay connected My Blog – David Hernie –

End of the session At the end, don’t forget to ask to fill the evaluation form and take a chance to win a Windows Phone 7

INTRODUCTION BIG PICTURE OF WINDOWS PHONE 7.5

Major Investment Areas Multi-tasking Enhanced Phone Framework XNA Silverlight Integration Integrating with the phone Performance Database Access Complete the push notification and Tile experience Marketplace Services Sockets

Multitasking Themes Fast Application Resume – Ability to resume applications that the user has recently used – Apps stay in memory unless memory is needed for other apps – *Every* app should do this Background Agents – Ability to run your code in the background – Audio, Timed or on Idle Notifications – Ability to create alarms and reminders – UX and behavior is the same as the phone Alarms and Calendar items Background Transfer Service – Application can queue up transfers in the background

Integrating with the Phone Camera Access to the pipeline No need to capture the image to flash Networking Sockets Connection Manager control Sensors GPS Accelerometer Compass Gyro Spatial Framework Data SQL CE Phone Contacts Phone Calendar Launchers & Choosers Bing Maps Phone Number Address Chooser Controls Frame and Page Navigation improvements Performance Open Source on CodePlex

Expanding the Phone Framework Push Notifications Deep Toast More control over notifications Phone Extras Search Music Photos Tiles Signature user experience for Windows Phone Complete Framework Multiple Tiles

Silverlight Investments Silverlight 4 RichTextBox Implicit Styles Clipboard API Performance Memory Management Input on Render Thread Profiler Instrumentation International Reading/Writing of all Mango Languages Big deal if you are writing an app for Asia XNA & Siverlight in the same app

Tools Investments.NET Performance Generational GC Serialization SIMD – Vector Profiler Tools New Template for Multitasking Debugging Background Agents Isolated Storage Explorer Profiler Emulator Sensors and Location in Emulator Multi Touch in Emulator Screen shot Ingestion Tool

DEVELOPER TOOLS & MARKETPLACE

My Hello World App Demo

What’s New in Windows Phone Developer Tools & Marketplace Multi-targeting Multitasking support Silverlight and XNA interop support Profiler Emulator enhancements

Emulator Enhancements Media support for H.264 Memory model improvements – Emulator can handle physical memory fragmentations like device Sensor Support

Accelerometer Based Apps

Emulator – Accelerometer support Demo

Location Based Apps

Emulator – Location support Demo

Profiler

Demo

Other Tooling support Multi-tasking Debugging support Isolated Storage Explorer Screen shot Tool

Marketplace Public Private Beta Test for Marketplace available inside VS2010

Marketplace test inside VS2010 Demo

MULTITASKING

Windows Phone Multitasking Multitask Between Application – Quickly Switch – Quickly Resume Start in foreground & continue in Background

Windows Phone Harmony Network Conscience Battery Friendly Hardened Services Delightful and Responsive UX Never Regret App Install Integrated Feel UX Health

Application Lifecycle Running Deactivated DormantActivated Save but do not dispose of state Re-load state ONLY if tombstoned Application is resident in memory; system detaches resources and pauses threads Tombstoned

Backgroud Notification Service 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); }

Backgroud Notification Service Reminders 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); }

Background Transfer Service Cloud Background Transfer Service <2 GB <20 MB <~3.0 MB GET POST My WP Book App ISO Store

Background Transfer Service 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); }

Generic Background Agents Agents – Periodic – On Idle – May have one or both Initialized in foreground, run in background – Persisted across reboots User control through CPL – Up to a maximum of 18 Synchronize with foreground through mutex Agent runs for up to 14 days (can be renewed)

Generic Agent Types Periodic Agents Occurrence – Every 30 min Duration – 15 seconds Scenarios – Incremental data sync – Location – Others… On Idle Agents Occurrence – External power, non-cell network Duration – 10 minutes Scenarios – Data feasting – Initial sync – Others…

Periodic Agent - Sample Code private void StartSearchAgent(object sender, RoutedEventArgs e) { PeriodicTask task = new PeriodicTask("twitter"); task.Description = "Gets latest tweet"; task.ExpirationTime = DateTime.Now.AddDays(7); ScheduledActionService.Add(task); } <BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="TwitterAgent" Source="TweetAgent" Type="TweetAgent.TweetAgent"/> public class TweetAgent : ScheduledTaskAgent { public override void OnInvoke(ScheduledTask Task) { // Do some background work NotifyComplete(); }; }

Background Audio – HTML5 <audio id="audio_tag" controls="controls" src=" onplay="StartPlayback()" onended="NextTrack()" function NextTrack() { musicPlayer = document.getElementById("audio_tag"); musicPlayer.src = ' } Cloud Browser Zune Service ++

Background Audio – URL Based Cloud Zune Service My Music App ISO Store ++ Buffer void PlayStateChanged(object sender, EventArgs e) { switch (player.PlayerState) { case PlayState.FastForwarding: // Move to next track break; } Player = BackgroundAudioPlayer.Instance; player.PlayStateChanged += new eventHandler(PlayStateChanged); AudioTrack track = new AudioTrack(new Uri("/audiofile.mp3"),…); … player.Play();

End-to-End Architecture System Services ISO Store Cloud Different Processes Logic UX myapp.dll ApplicationOS Logic myappagent.dll Single App Developer

Background Agent Functionality Allowed  Tiles  Toast  Location  Network  R/W ISO store  Structured storage  Sockets  Most framework APIs Restricted  Display UI  XNA libraries  Microphone and Camera  Sensors  Play audio (may only use background audio APIs)

Windows Phone Harmony - UX CPU – Balance foreground and background – Monitor usage Delightful and Responsive UX Never Regret App Install Integrated Feel  Working Set  Maximize # of dormant apps  5 MB for periodic  10 MB for audio  BTS limits per app  Periodic agents run serially when screen is on  App isolation is maintained  No app execution on install  Additional ingestion rules

Windows Phone Harmony - Health Efficient Network Usage – Aligned with radio – On Idle agents don’t use radio Network Conscience Battery Friendly Hardened Services  New System Services  Secure  Performant  Reliable  Stress tested  Periodic Agents  CPL provides user control  Expire after 14 days  Run 15 seconds every 30 min  Cache GPS  Execute in parallel when screen is off  Participate in battery saver mode

Periodic Agent Demo

SQLCE AND ISOLATED STORAGE

Local Data Storage: Overview Apps store private data in Isolated Storage  Settings and properties in the app dictionary  Unstructured data in Isolated Storage files  Structured data in database files Application Settings File App Creates/Manages files and settings Application Files App Data Folder Creates root folder sandboxed to App Package Manager App Root Folder WP7 Isolated Storage APIs Install DB Database file DB Database File (r/o)

Architecture Custom Data Context App Objects Identity Management Change Tracking Update Processing Object Materialization Core ADO.NET (System.Data) SQLCE ADO.NET Provider (System.Data.SqlServerCe) SQL CE DB.Call System.Linq.Queryable.Select(.Call System.Linq.Queryable.Where(.Constant(Table(Wines)), '(.Lambda #Lambda1)), '(.Lambda #Lambda2)).Lambda #Lambda1(db.Wines $w) { $w.Country == “USA" }.Lambda #Lambda2(w.Country $w) { $w.Name } var query = from w in db.Wines where w.Country == “USA" select w.Name; select Name from Wines where Country = “USA”

Code First Development Design time  Create object model: wines, varietals, vineyards, etc.  Decorate objects with attributes for persistence Run time  Create DataContext reference to database  Translate object model into a database file  Submit API persists changes to DB Database upgrade  Create new objects to enable new features  Use upgrade APIs to change DB Varietals Wines Vineyards WineMakers

Database Creation: Example // Define the data context. public partial class WineDataContext : DataContext { public Table Wines; public Table 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();

Queries: Examples // Create the database form data context, using a connection string DataContext db = new WineDataContext("isostore:/wineDB.sdf"); // 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;

Inserts/Updates/Deletes DB NameLittle Penguin VarietalPinot Noir AtHome False NameLittle Penguin VarietalPinot Noir AtHome True It’s all about the DataContext – Changes made against the DataContext first – Changes persisted by calling SubmitChanges() SubmitChanges – LINQ to SQL determines change set and submits to DB NameLittle Penguin VarietalPinot Noir AtHome False NameYellow Tail VarietalPinot Noir AtHome True

Inserts/Updates/Deletes Insert Update Wine newWine = new Wine { WineID = “1768", Name = “Windows Phone Syrah", Description = “Bold and spicy" }; db.Wines.InsertOnSubmit(newWine); db.SubmitChanges(); Wine wine = (from w in db.Wines where w.WineID == “1768" select w).First(); wine.Description = “Hints of plum and melon"; db.SubmitChanges();

Inserts/Updates/Deletes Delete var vineyardsToDelete = from Vineyards v in db.Vineyards where v.Country == “Australia” select v; db.Vineyards.DeleteAllOnSubmit (vineyardsToDelete); db.SubmitChanges();

SQLCE Demo

Database Schema Upgrades DatabaseSchemaUpdater allows for simple upgrades on your existing DB It offers the ability to add – Tables – Columns – Indices – Associations/foreign keys All schema updates are transactional More complex schema upgrades require full DB migration

Performance and Best Practices Keep change sets small – Submit early and often to avoid data loss on app termination Use background threads – Non-trivial operations will impact app responsiveness if done on UI thread Optimize read-only queries – Set ObjectTrackingEnabled to minimize memory usage Use secondary indices for properties which you query often Populate large reference data tables in advance – Create a simple project to prepopulate data in emulator – Pull out database file using Isolated Storage explorer When to use a database… – Expect some impact to startup time and memory usage from incorporating a DB – Stick to IsolatedStorageSettings or basic files for small data sets

USER DATA CONTACTS AND APPOINTMENTS

New and updated APIs in “Mango” Chooser Tasks related to user data – AddressChooserTask – PhoneNumberChooserTask – AddressChooserTask Microsoft.Phone.UserData for direct access – Contacts – Appointments Important points – Contacts and Appointments APIs are read only – Third party social network data cannot be shared

Contacts/Appointments Data Shared Contact Name and Picture Other contact dataAppointments/Events Windows Live SocialYES Windows Live Rolodex (user created and SIM import) YES n/a Exchange accounts (corporate plus Google, etc.) YES Operator Address BooksYES n/a FacebookYESNO Other networks in the People Hub (e.g., Twitter) NO

AddressChooserTask private AddressChooserTask addressChooserTask; // Constructor public MainPage() { this.addressChooserTask = new AddressChooserTask(); this.addressChooserTask.Completed += new EventHandler ( addressChooserTask_Completed); } private void addressChooserTask_Completed(object sender, AddressResult e) { if (null == e.Error && TaskResult.OK == e.TaskResult) {... = e.DisplayName;... = e.Address; }

Contacts Contacts contacts = new Contacts(); contacts.SearchCompleted += new EventHandler ((sender, e) => {... = e.Results; }); // E.g. search for all contacts contacts.SearchAsync(string.Empty, FilterKind.None, null); filter expression (not a regex) Filter kind: name, , phone or pinned to start) state // E.g. search for all contacts with display name matching "ja" contacts.SearchAsync("ja", FilterKind.DisplayName, null);

Appointments Appointments appointments = new Appointments(); appointments.SearchCompleted += new EventHandler ((sender, e) => {... = e.Results; }); // E.g. get next appointment (up to 1 week away) appointments.SearchAsync(DateTime.Now, DateTime.Now + TimeSpan.FromDays(7), 1, null); start date and time Maximum items to return state end date and time

Conclusion Many new APIs  Many new application ideas Discover and enjoy Windows Phone development Don’t forget to fill the evaluation form –