Windows Phone 7 Mango Overview for Developers Sascha P. Corti Developer Evangelist, Microsoft Switzerland [email protected]| techpreacher.corti.com | @TechPreacher.
Download ReportTranscript Windows Phone 7 Mango Overview for Developers Sascha P. Corti Developer Evangelist, Microsoft Switzerland [email protected]| techpreacher.corti.com | @TechPreacher.
Windows Phone 7 Mango Overview for Developers Sascha P. Corti Developer Evangelist, Microsoft Switzerland [email protected]| techpreacher.corti.com | @TechPreacher “Submit an App, Win a Phone” Submit a Windows Phone App, Win a Phone Submit your app to the Windows Phone Marketplace. Once it’s approved and published, send us a mail and get the chance to win one of 66 new “Lumia“ Windows Phone devices from Nokia (color and model based on availability). Add the following information to the mail: To: [email protected] Subject: “I want a phone” Body: Add the Windows Phone MarketplaceLink to your app including your contact details. Deadline: 29. February 2012 Win a Microsoft Surface! The Developer with the most apps in the Windows Phone Marketplace will win! Deadline: 29. January 2012 Handover: 12. March 2012 (Windows Tech Conference, Baden) http://corti.ch/wp7appcontest Windows Phone 7 “Mango” Windows Phone “Mango” Cloud and Integration Services App Model UI Model Software Architecture Hardware Foundation Extras, Tiles Push, Alerts Calendar Contacts Maps Multitasking Silverlight and XNA Integration Gen GC SQL CE Silverlight 4.0 Sockets Fast App Switch Camera, Sensors & Motion Gyro Flexible chassis Cloud and Integration Services App Model UI Model Software Architecture Multi-Tasking Hardware Foundation Multitasking current fav 0:10 0:09 0:12 0:11 9:00 AM Friday Words October 21 ByPaul van Dyk TechDays 2011 Fall Bern 9:00 AM – 6:00 PM Start in Foreground Continue in Background Background 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); } Modal Snooze and Dismiss Sound Customization No App Invocation No Stacking Background 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); } Persisted Across Reboots Rich Information Integrates with other Reminders Snooze and Dismiss Launch App Follows Phone Global Settings Background Transfer Service using Microsoft.Phone.BackgroundTransfer; My WP Book App download Ready Player One void GetCurrentProgress() DownloadWithBTS(Uri sourceUri, BtsProgressChanged(object sender, UriBackgroundTransferEventArgs destinationPath) e) { { DrawProgressBar(btr.BytesReceived); btr = new BackgroundTransferRequest(sourceUri, destinationUri); } btr.TransferStatusChanged += BtsStatusChanged; btr.TransferProgressChanged += BtsProgressChanged; DrawProgressBar(e.Request.BytesReceived); BackgroundTransferService.Add(btr); } completed Jpod WP7 for Devs My WP Book App ISO Store Background Transfer Service Great Mysteries o POSTMB <~3.0 <20 GETMB < 100 MB Cloud demo… Background Transfer Service Generic Background Agents Occurrence: Every 30 min Duration: 15 seconds Scenarios: Incremental Data Sync Agents Periodic Occurrence: External power, Duration: 10 minutes On Idle Scenarios: Data Feasting May have One or Both Initialized in Foreground, Run in Background Persisted across Reboots User control through Control Panel Up to a Maximum of 18 periodic agents Synchronize with Foreground through Mutex Agent runs for up to 14 Days (can be renewed) non-cell network demo… Background Agents Cloud and Integration Services App Model UI Model Software Architecture Application Lifecycle Hardware Foundation New Application Resume UX Faster user experience! Enabled for all Mango apps Recompile & Test your WP7 application Resuming . . . Application Lifecycle Fast App Resume State is Preserved running Tomb stoned Tomb stoned deacti vated activated dormant Save App State! Tomb stoned Phone resources detached Threads & timers suspended Application Lifecycle Resuming . . . Restore State ! deacti vated activated Tomb stoned Tombstone the oldest app running tomb stoned dormant Application Lifecycle Tomb stoned running deacti vated activated tomb stoned dormant Multitasking Cheat Sheet Job Tool Resume quickly from the lock screen Fast App Switching Set an alarm or reminder at a precise time Background Notification Upload or download files Background Transfer Event-based toast/tile updates Push Notifications Location-based services; regular toast/tile updates; data pre-caching; etc. Periodic Background Agent Play music in the background Background Audio Player Synchronize data; SETI@home; etc. Resource-Intensive Agent Real-time GPS tracking Run under the lock screen Cloud and Integration Services App Model UI Model Software Architecture New Sensor Capabilites Hardware Foundation New Scenarios Enabled Hardware Sensors & API HARDWARE Accelerometer Compass Not Mandatory in HW (but present if Gyro is) Gyro Not Mandatory in HW APIs MotionSensor All the Sensor + Math Use whenever available Also works w/o Gyro Individual APIs available for all Sensors demo… Motion & Accelerometer Cloud and Integration Services App Model UI Model Software Architecture Local Database Hardware Foundation Database Creation: Example // 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(); 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 Package Manager App Root Folder Install Creates root folder sandboxed to App DB Database File (r/o) App Data Folder App WP7 Isolated Storage APIs Creates/Manages files and settings Application Settings File DB Database file Application Files Cloud and Integration Services App Model UI Model Software Architecture Live Tile Improvements Hardware Foundation Live Tile Improvements Local Tile APIs Full Control of ALL Properties Multiple Tiles per app Create, Update / Delete / Query Launches directly to In App URI Live Tiles – Local Tile API Back of Tile Updates Full Control of all Properties when your App is in Foreground or Background Content, Title, Background Content string is bigger Content Background Title Title Flips from Front to Back at random Interval Smart Logic make Flips Asynchronous “Mango” Updated Developer Tools Emulator & Developer Tools Emulator Enhancements Memory model improvements Emulator can handle physical memory fragmentations Media support for H.264, AAC Sensor Support Accelerometer and Location Multi-Touch Tools Enhancements Integrated Profiler Visual , Code and Memory profiler Performance Analysis Built-in anti-pattern analyzer Guides through step-by-step Background Agent Debugging Marketplace Test Kit demo… Developer Tools Simulating GPS Data & Sensors Profiling Marketplace Test Kit The New Market Place What’s New on the Marketplace? http://windowsphone.com/s?appid= 8bda38b9-619e-4368-b849-d25630266c4b ITIN Resubmit Apps to Reach New Markets! Marketplace: Distribution Options “Beta” Private Public # of users 100 unlimited unlimited App Price Must be “free” Can be “paid” Can be “paid” Time Limited Expires after 90d No No Updateable No Yes Yes Certification Required No Yes Yes Discoverable No No * Yes Access Control Limited to test user No WLIDs provided No Target Users Beta Users Public Users * People who obtain deeplink can access Private Users Marketplace: New Regions 1.8 Billion More Potential Users Resubmit your App to reach New Markets! Hong Kong Singapore Today (16) +19 New (35) Resources Online Resources I : The Basics App Hub Tools http://create.msdn.com http://wpdev.ms/wpsdk71rc WP on MSDN Library WP “How To” Index WP UX Guide WP P&P Guide http://wpdev.ms/wponmsdn http://wpdev.ms/wphowtos http://wpdev.ms/wpuxguide http://wpdev.ms/wppnpguide WP Dev Blog Porting to WP WP Labs (RTM) http://wpdev.ms/developerblog http://wpdev.ms/porting http://wpdev.ms/wprtmhols WP Labs (Mango) WP SL Quick Starts http://wpdev.ms/mangohol http://wpdev.ms/xamlquick Online Resources II : Videos WP Jumpstart WP How To Videos WP “Absolute Beginners” Inside WP on C9 Design Toolbox WP Game Dev Vids WP at MIX 11 Vids WP at TENA 11 Vids http://wpdev.ms/jumpstarts http://wpdev.ms/howvids http://wpdev.ms/beginvids http://wpdev.ms/insidewp http://wpdev.ms/designtb http://wpdev.ms/gamevids http://wpdev.ms/wpmix11 http://wpdev.ms/wptena11 Online Resources III : Other App Hub FAQ App Hub Forums Registration Walkthrough Submission Walkthrough Cert Requirements WP Samples on MSDN SL Toolkit for WP Azure Toolkit for WP http://wpdev.ms/apphubfaq http://wpdev.ms/ahforum http://wpdev.ms/regwalk http://wpdev.ms/subwalk http://wpdev.ms/certreq http://wpdev.ms/officialsamples http://wpdev.ms/wpsltk http://wpdev.ms/wpwaztk Online Resources IV : Silverlight Show on WP Windows Phone Geek WPDEV on Twitter WPDEV on REDDIT WPDEV on Stack Overflow rd 3 Party http://www.silverlightshow.net/Search.a spx?q=%5Bwindows-phone-7%5D http://www.windowsphonegeek.com/ http://twitter.com/#search?q=wp7dev http://www.reddit.com/r/wp7dev http://stackoverflow.com/questions/tag ged/windows-phone-7 © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.