SlideShare una empresa de Scribd logo
1 de 37
Cool Stuff Your App
Can Do

Ed Donahue
Academic Developer Evangelist

ed.donahue@microsoft.com
creepyed.com | @creepyed
What I’m Going to Cover

 Storage and tombstoning
 Alarms and reminders
 Application tiles
 Other cool stuff




 Windows Phone           2
Storage and
Tombstoning
Demo



Fast Application
Switching
Application Lifecycle - Dormant
                                                     Fast App Resume


                                   running
State preserved!
e.IsApplicationInstancePreserved                                Save State!
== true




                    activated                  deactivated




                                   dormant   Phone resources
                                             detached
                                             Threads & timers
                                             suspended
    Windows Phone
Application Lifecycle - Tombstoned
                                                                Resuming .. .
Restore state!
e.IsApplicationInstancePreserved
== false
                                       running




                           activated              deactivated

 Tombstone
 the oldest
 app

              Tombstoned               dormant   Phone resources detached
                                                 Threads & timers suspended

     Windows Phone
Finding the Resume type
    private void Application_Activated(object sender, ActivatedEventArgs e)
    {
        if (e.IsApplicationInstancePreserved)
        {
            // Dormant - objects in memory intact
        }
        else
        {
            // Tombstoned - need to reload
        }
    }




   The Activation handler can test a flag to determine the
    type of resume taking place

     Windows Phone
Deactivation Resource
Management
                        MediaPlayer.Pause
                       MediaElement.Pause
                    SoundEffectInstance.Pause
                     VibrateController.Stop
                       PhotoCamera.Dispose
                       Save page/global state


                 XNA Audio      Paused
                 Sensors        Notifications suppressed
                 Networking     Cancelled
                 Sockets        Disconnected
                 MediaElement   Disconnected
                 Camera         Disposed

 Windows Phone
Activation Resource Management

                 MediaElement.Source/Position/
                              Play
                 Socket.ConnectAsync
                 new PhotoCamera/VideoCamera

                 Restore app state if tombstoned


                 XNA Audio      Resumed
                 Sensors        Notifications resumed
                 Networking     Completed with Cancellation
                 Sockets        -
                 MediaElement   -
                 Camera         -
 Windows Phone
Isolated Storage vs State Storage
   Isolated storage is so called because the data for an
    application is isolated from all other applications
       It can be used as filestore where an application can
        store folders and files
       It is slow to access, since it is based on NVRAM
        technology
       It can also be used to store name/value pairs, e.g.
        program settings
   State storage is so called because it is used to hold the
    state of an application
       It can be used to store name/value pairs which are held
        in memory for dormant or tombstoned applications
       It provides very quick access to data

    Windows Phone                       10
Captain’s Log


Demo
•   With No Storage
•   With Storage
•   Fully Working
Fast App Switching and
Tombstoning Review
   Only one Windows Phone application is Active at any time
   The Start and Back buttons on the phone are used to start
    new applications and return to previously used ones
   If an application is replaced by another it is either made
    Dormant (still in memory but not running) or Tombstoned
    (removed from memory)
   Applications must use populate methods provided in the
    App.xaml.cs class to save and retrieve state information
    when appropriate
        State can be stored in memory for quick reload and in
         isolated storage which serve as a permanent store
    Windows Phone                       12
Alarms and
Reminders
Scheduled Notifications

 Time-based, on-phone notifications
 Supports Alarms & Reminders
 Persist across reboots
 Adheres to user settings
 Consistent with phone UX




 Windows Phone
Alarms vs Reminders?
    Alarms                   Reminder
                             s




•   Modal                 • Rich information
•   Snooze and Dismiss    • Integrates with other
•   Sound customization     reminders
•   No app invocation     • Snooze and Dismiss
•   No stacking           • Launch app
                          • Follows the phones global
    15                      settings
Creating a Reminder
    using Microsoft.Phone.Scheduler;
    ...
    eggReminder = new Reminder("Egg Timer");

    eggReminder.BeginTime = DateTime.Now + new TimeSpan(0, eggTime, 0);
    eggReminder.Content = "Egg Ready";
    eggReminder.RecurrenceType = RecurrenceInterval.None;
    eggReminder.NavigationUri = new Uri("/EggReadyPage.xaml",
             UriKind.Relative);

    ScheduledActionService.Add(eggReminder);



   This code creates a reminder and adds it as a scheduled
    service
   The value eggTime holds the length of the delay
   This code also sets the url of the page in the application
     Windows Phone
Reminder Housekeeping
Reminder eggReminder = ScheduledActionService.Find("Egg Timer")
         as Reminder;

if ( eggReminder != null )
{
    ScheduledActionService.Remove("Egg Timer");
}


 Reminders are identified by name
 This code finds the “Egg Timer”
 reminder and then removes it from
 the scheduler
 Windows Phone
Demo




Egg Timer
Application Tiles
Tiles 101

   Shortcuts to apps
   Static or dynamic
   2 sizes: small &
    large
      Large only for
       1st party apps
   End-user is in
    control
    Windows Phone
Data Driven Template Model
 A fixed set of data properties
 Each property corresponds to a UI
  element
 Each UI element has a fixed position on
  screen
 Not all elements need to be used
 Animations are not extensible




      Background       Title   Count
         Image
    (173 x 173 .png)
     Windows Phone
Scenarios/Popular Applications

   Weather Apps             Send to WP7
         Weather Tile          Link Tile
         Warning Toast         Link Toast
   Chess by Post            AlphaJax
       Turn Tile               Turn Tile
       Move Toast              Move Toast
   Beezz                    Seattle Traffic Map
       Unread Tile               Traffic Tile
       Direct Toast




    Windows Phone
Primary and Secondary Tiles
   Application Tile                    Front

     Pinned from App List
     Properties are set initially in
      the Application Manifest
                                        Back

   Secondary Tile
     New in Windows Phone 7.5!
     Created as a result of user
      input in an application
    Windows Phone
Live Tiles – Local Tile API

   Local tile updates (these are *not* push)
      Full control of all properties when your app
          is in the foreground or background
      Calorie counter, sticky notes
   Multi-Tile!
      Deep-link to specific application sections
      Launch directly to page/experience




    Windows Phone
Live Tiles – Local Tile API
Continued…
   Back of tile updates
      Full control of all properties when your app
       is in the foreground or background
      Content, Title, Background
      Content       Content
      string is                               Background
      bigger
                              Title   Title



           Flips from front to back at random interval
           Smart logic to make flips asynchronous

    Windows Phone
Demo



Live Tiles – Local Tile API
Other Cool Stuff
Easy-Bake Oven Apps

 AppMakr
 Follow My Feed
 ScriptTD
 Silverlight Toolkit:
 silverlight.codeplex.com


 Windows Phone
AppMakr (appmakr.com) Tips
   Find RSS feeds either by searching AppMakr or searching the
    site for “RSS”
   Want a Twitter RSS?
        http://twitter.com/statuses/user_timeline/USERID.atom
        Use www.idfromuser.com to find Twitter user ID
   Want to make multiple RSS feeds into one?
        Yahoo Pipes
        http://rssmix.com ( I used this one)
   Feel free to upload your own images
        App icon: 512 x 512 pixels
        Splash screen: 480 x 800 pixels
   bit.ly/appmakrlab
    Windows Phone
FollowMyFeed.net

 Uses Panorama
 One RSS feed
 Allows for favorites




 Windows Phone
ScriptTD

 Tower defense game engine
 All you have to do is change the
  graphics & audio!
 scriptTD.codeplex.com/




 Windows Phone
Contests!
Idea of the Week

 Submit your great app idea for a
  chance to win $50!
 Create a Sketchflow prototype
  and post it online
  (wp7sketchflow.codeplex.com/)
 Tweet the URL with
  #WPAppItUp
 Judged on Innovation,
  Experience and Potential

   Rules: bit.ly/idearules
    Windows Phone
Your App Here

 Be a featured app in
  December, January or February!
 Win a digital ad campaign that
  will deliver one million ad
  impressions!
 Receive featured placement on
  the Windows Phone
  Marketplace
 More info:
  wpyourapphere.com
    Windows Phone
Core77 Fast Track

 Design a productivity app for
  Windows Phone
 5 winning designers get an App
  Development Deal, Windows
  Phone, Xbox 360 with Kinect, &
  App Hub subscription
 Ends Nov. 18. 2011
 More info:
  http://fasttrackapp.core77.com


    Windows Phone
Q&A
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.




© 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.

Más contenido relacionado

Similar a Cool Stuff Your App Can Do

What's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersWhat's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for Developers
Glen Gordon
 
follow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingfollow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switching
QIRIS
 
07 wp7 application lifecycle
07 wp7   application lifecycle07 wp7   application lifecycle
07 wp7 application lifecycle
Tao Wang
 
Phonegap deep-dive
Phonegap deep-divePhonegap deep-dive
Phonegap deep-dive
alunny
 
Using AIR for Mobile Development
Using AIR for Mobile DevelopmentUsing AIR for Mobile Development
Using AIR for Mobile Development
Veronique Brossier
 
Cross platform mobile development in c#
Cross platform mobile development in c#Cross platform mobile development in c#
Cross platform mobile development in c#
danhermes
 
Windows Phone 7: Navigating Between Pages
Windows Phone 7: Navigating Between PagesWindows Phone 7: Navigating Between Pages
Windows Phone 7: Navigating Between Pages
Jussi Pohjolainen
 

Similar a Cool Stuff Your App Can Do (20)

What's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersWhat's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for Developers
 
follow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingfollow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switching
 
Windows Phone Application Platform
Windows Phone Application PlatformWindows Phone Application Platform
Windows Phone Application Platform
 
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewWindows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's New
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
Windows Phone Fast App Switching, Tombstoning and Multitasking
Windows Phone Fast App Switching, Tombstoning and MultitaskingWindows Phone Fast App Switching, Tombstoning and Multitasking
Windows Phone Fast App Switching, Tombstoning and Multitasking
 
Windows 8 BootCamp
Windows 8 BootCampWindows 8 BootCamp
Windows 8 BootCamp
 
23 silverlight apps on windows phone 8.1
23   silverlight apps on windows phone 8.123   silverlight apps on windows phone 8.1
23 silverlight apps on windows phone 8.1
 
Windows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 PreviewWindows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 Preview
 
07 wp7 application lifecycle
07 wp7   application lifecycle07 wp7   application lifecycle
07 wp7 application lifecycle
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"  Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
 
Phonegap deep-dive
Phonegap deep-divePhonegap deep-dive
Phonegap deep-dive
 
Using AIR for Mobile Development
Using AIR for Mobile DevelopmentUsing AIR for Mobile Development
Using AIR for Mobile Development
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Cross platform mobile development in c#
Cross platform mobile development in c#Cross platform mobile development in c#
Cross platform mobile development in c#
 
Windows Phone 7: Navigating Between Pages
Windows Phone 7: Navigating Between PagesWindows Phone 7: Navigating Between Pages
Windows Phone 7: Navigating Between Pages
 
Creating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGapCreating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGap
 
Live Tiles and Notifications in Windows Phone
Live Tiles and Notifications in Windows PhoneLive Tiles and Notifications in Windows Phone
Live Tiles and Notifications in Windows Phone
 
MobileApplicationTesting.pptx
MobileApplicationTesting.pptxMobileApplicationTesting.pptx
MobileApplicationTesting.pptx
 

Más de Ed Donahue

Más de Ed Donahue (20)

AT&T Hackathon Hawaii
AT&T Hackathon HawaiiAT&T Hackathon Hawaii
AT&T Hackathon Hawaii
 
AT&T Hack-o-ween
AT&T Hack-o-weenAT&T Hack-o-ween
AT&T Hack-o-ween
 
AT&T Government Hackathon, Washington DC. 10/6/2017
AT&T Government Hackathon, Washington DC. 10/6/2017AT&T Government Hackathon, Washington DC. 10/6/2017
AT&T Government Hackathon, Washington DC. 10/6/2017
 
AT&T IoT Civic Hackathon @ IndyPy
AT&T IoT Civic Hackathon @ IndyPyAT&T IoT Civic Hackathon @ IndyPy
AT&T IoT Civic Hackathon @ IndyPy
 
AT&T VR/AR Hackathon - Seattle
AT&T VR/AR Hackathon - SeattleAT&T VR/AR Hackathon - Seattle
AT&T VR/AR Hackathon - Seattle
 
AT&T IoT Hackathon - Dallas (hosted by The DEC)
AT&T IoT Hackathon - Dallas (hosted by The DEC)AT&T IoT Hackathon - Dallas (hosted by The DEC)
AT&T IoT Hackathon - Dallas (hosted by The DEC)
 
Cisco Lightning Talk
Cisco Lightning TalkCisco Lightning Talk
Cisco Lightning Talk
 
Intel Lightning Talk
Intel Lightning TalkIntel Lightning Talk
Intel Lightning Talk
 
IBM Lightning Talk
IBM Lightning TalkIBM Lightning Talk
IBM Lightning Talk
 
AT&T Public Sector Hackathon
AT&T Public Sector HackathonAT&T Public Sector Hackathon
AT&T Public Sector Hackathon
 
AT&T IoT Hackathon - Seattle
AT&T IoT Hackathon - SeattleAT&T IoT Hackathon - Seattle
AT&T IoT Hackathon - Seattle
 
AT&T Shape Hackathon Kick-off
AT&T Shape Hackathon Kick-offAT&T Shape Hackathon Kick-off
AT&T Shape Hackathon Kick-off
 
BIAC Hackathon Kick-off
BIAC Hackathon Kick-offBIAC Hackathon Kick-off
BIAC Hackathon Kick-off
 
BIAC Hackathon Lightning Talks
BIAC Hackathon Lightning TalksBIAC Hackathon Lightning Talks
BIAC Hackathon Lightning Talks
 
AT&T Smart Cities Hackathon
AT&T Smart Cities HackathonAT&T Smart Cities Hackathon
AT&T Smart Cities Hackathon
 
AT&T Mobile App & IoT Hackathon @ Catalyst
AT&T Mobile App & IoT Hackathon @ Catalyst AT&T Mobile App & IoT Hackathon @ Catalyst
AT&T Mobile App & IoT Hackathon @ Catalyst
 
AT&T Mobile App Hackathon (Smart City) - Berkeley
AT&T Mobile App Hackathon (Smart City) - BerkeleyAT&T Mobile App Hackathon (Smart City) - Berkeley
AT&T Mobile App Hackathon (Smart City) - Berkeley
 
AT&T Mobile App Hackathon - Seattle
AT&T Mobile App Hackathon - SeattleAT&T Mobile App Hackathon - Seattle
AT&T Mobile App Hackathon - Seattle
 
PGCC Lunch & Learn: Windows Phone
PGCC Lunch & Learn: Windows PhonePGCC Lunch & Learn: Windows Phone
PGCC Lunch & Learn: Windows Phone
 
Imagine Cup at CWIC2012
Imagine Cup at CWIC2012Imagine Cup at CWIC2012
Imagine Cup at CWIC2012
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Cool Stuff Your App Can Do

  • 1. Cool Stuff Your App Can Do Ed Donahue Academic Developer Evangelist ed.donahue@microsoft.com creepyed.com | @creepyed
  • 2. What I’m Going to Cover  Storage and tombstoning  Alarms and reminders  Application tiles  Other cool stuff Windows Phone 2
  • 5. Application Lifecycle - Dormant Fast App Resume running State preserved! e.IsApplicationInstancePreserved Save State! == true activated deactivated dormant Phone resources detached Threads & timers suspended Windows Phone
  • 6. Application Lifecycle - Tombstoned Resuming .. . Restore state! e.IsApplicationInstancePreserved == false running activated deactivated Tombstone the oldest app Tombstoned dormant Phone resources detached Threads & timers suspended Windows Phone
  • 7. Finding the Resume type private void Application_Activated(object sender, ActivatedEventArgs e) { if (e.IsApplicationInstancePreserved) { // Dormant - objects in memory intact } else { // Tombstoned - need to reload } }  The Activation handler can test a flag to determine the type of resume taking place Windows Phone
  • 8. Deactivation Resource Management MediaPlayer.Pause MediaElement.Pause SoundEffectInstance.Pause VibrateController.Stop PhotoCamera.Dispose Save page/global state XNA Audio Paused Sensors Notifications suppressed Networking Cancelled Sockets Disconnected MediaElement Disconnected Camera Disposed Windows Phone
  • 9. Activation Resource Management MediaElement.Source/Position/ Play Socket.ConnectAsync new PhotoCamera/VideoCamera Restore app state if tombstoned XNA Audio Resumed Sensors Notifications resumed Networking Completed with Cancellation Sockets - MediaElement - Camera - Windows Phone
  • 10. Isolated Storage vs State Storage  Isolated storage is so called because the data for an application is isolated from all other applications  It can be used as filestore where an application can store folders and files  It is slow to access, since it is based on NVRAM technology  It can also be used to store name/value pairs, e.g. program settings  State storage is so called because it is used to hold the state of an application  It can be used to store name/value pairs which are held in memory for dormant or tombstoned applications  It provides very quick access to data Windows Phone 10
  • 11. Captain’s Log Demo • With No Storage • With Storage • Fully Working
  • 12. Fast App Switching and Tombstoning Review  Only one Windows Phone application is Active at any time  The Start and Back buttons on the phone are used to start new applications and return to previously used ones  If an application is replaced by another it is either made Dormant (still in memory but not running) or Tombstoned (removed from memory)  Applications must use populate methods provided in the App.xaml.cs class to save and retrieve state information when appropriate  State can be stored in memory for quick reload and in isolated storage which serve as a permanent store Windows Phone 12
  • 14. Scheduled Notifications  Time-based, on-phone notifications  Supports Alarms & Reminders  Persist across reboots  Adheres to user settings  Consistent with phone UX Windows Phone
  • 15. Alarms vs Reminders? Alarms Reminder s • Modal • Rich information • Snooze and Dismiss • Integrates with other • Sound customization reminders • No app invocation • Snooze and Dismiss • No stacking • Launch app • Follows the phones global 15 settings
  • 16. Creating a Reminder using Microsoft.Phone.Scheduler; ... eggReminder = new Reminder("Egg Timer"); eggReminder.BeginTime = DateTime.Now + new TimeSpan(0, eggTime, 0); eggReminder.Content = "Egg Ready"; eggReminder.RecurrenceType = RecurrenceInterval.None; eggReminder.NavigationUri = new Uri("/EggReadyPage.xaml", UriKind.Relative); ScheduledActionService.Add(eggReminder);  This code creates a reminder and adds it as a scheduled service  The value eggTime holds the length of the delay  This code also sets the url of the page in the application Windows Phone
  • 17. Reminder Housekeeping Reminder eggReminder = ScheduledActionService.Find("Egg Timer") as Reminder; if ( eggReminder != null ) { ScheduledActionService.Remove("Egg Timer"); }  Reminders are identified by name  This code finds the “Egg Timer” reminder and then removes it from the scheduler Windows Phone
  • 20. Tiles 101  Shortcuts to apps  Static or dynamic  2 sizes: small & large  Large only for 1st party apps  End-user is in control Windows Phone
  • 21. Data Driven Template Model  A fixed set of data properties  Each property corresponds to a UI element  Each UI element has a fixed position on screen  Not all elements need to be used  Animations are not extensible Background Title Count Image (173 x 173 .png) Windows Phone
  • 22. Scenarios/Popular Applications  Weather Apps  Send to WP7  Weather Tile  Link Tile  Warning Toast  Link Toast  Chess by Post  AlphaJax  Turn Tile  Turn Tile  Move Toast  Move Toast  Beezz  Seattle Traffic Map  Unread Tile  Traffic Tile  Direct Toast Windows Phone
  • 23. Primary and Secondary Tiles  Application Tile Front  Pinned from App List  Properties are set initially in the Application Manifest Back  Secondary Tile  New in Windows Phone 7.5!  Created as a result of user input in an application Windows Phone
  • 24. Live Tiles – Local Tile API  Local tile updates (these are *not* push)  Full control of all properties when your app is in the foreground or background  Calorie counter, sticky notes  Multi-Tile!  Deep-link to specific application sections  Launch directly to page/experience Windows Phone
  • 25. Live Tiles – Local Tile API Continued…  Back of tile updates  Full control of all properties when your app is in the foreground or background  Content, Title, Background Content Content string is Background bigger Title Title  Flips from front to back at random interval  Smart logic to make flips asynchronous Windows Phone
  • 26. Demo Live Tiles – Local Tile API
  • 28. Easy-Bake Oven Apps  AppMakr  Follow My Feed  ScriptTD  Silverlight Toolkit: silverlight.codeplex.com Windows Phone
  • 29. AppMakr (appmakr.com) Tips  Find RSS feeds either by searching AppMakr or searching the site for “RSS”  Want a Twitter RSS?  http://twitter.com/statuses/user_timeline/USERID.atom  Use www.idfromuser.com to find Twitter user ID  Want to make multiple RSS feeds into one?  Yahoo Pipes  http://rssmix.com ( I used this one)  Feel free to upload your own images  App icon: 512 x 512 pixels  Splash screen: 480 x 800 pixels  bit.ly/appmakrlab Windows Phone
  • 30. FollowMyFeed.net  Uses Panorama  One RSS feed  Allows for favorites Windows Phone
  • 31. ScriptTD  Tower defense game engine  All you have to do is change the graphics & audio!  scriptTD.codeplex.com/ Windows Phone
  • 33. Idea of the Week  Submit your great app idea for a chance to win $50!  Create a Sketchflow prototype and post it online (wp7sketchflow.codeplex.com/)  Tweet the URL with #WPAppItUp  Judged on Innovation, Experience and Potential  Rules: bit.ly/idearules Windows Phone
  • 34. Your App Here  Be a featured app in December, January or February!  Win a digital ad campaign that will deliver one million ad impressions!  Receive featured placement on the Windows Phone Marketplace  More info: wpyourapphere.com Windows Phone
  • 35. Core77 Fast Track  Design a productivity app for Windows Phone  5 winning designers get an App Development Deal, Windows Phone, Xbox 360 with Kinect, & App Hub subscription  Ends Nov. 18. 2011  More info: http://fasttrackapp.core77.com Windows Phone
  • 36. Q&A
  • 37. 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. © 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.

Notas del editor

  1. You can do this from either a real device via the visualizer or the latest version of the emulator. The visualizer approach is perhaps more impressive as you can have some games amongst the programs that you can show navigation to.Show the Windows Phone start screen.Start Internet Explorer. Navigate to a page.Press the Windows Button to reopen the start page.Open the Settings page.Open the Theme page in settings.Press the Search buttonThe search window will openHold down the Back buttonThis will display all the currently active applications including theme, settings, search and IETouch IE to return to it.Press the Back button. Note that you are returned to the Search page. Ask if this is sensible.Answer: Yes it is, this is the place you were at before you switched back to the browser.Ask where you will go if you press the back button again. Answer: Back to the theme page.Press back to prove this.Press the back button again and you will return to the Settings page.Explain that with each press of back you are unwinding the back stackPress back at the Settings page and you are not returned to IE. Ask why.Answer: IE was moved to the top of the stack when we selected it from the list of applications. Instead you are returned to the Start page.Hold down the Back button to display the list of currently active applications and you should just see the start page, since all the others have been “popped” off.
  2. This is the test that can be performed during Activation. If the test fails it means that we have to reload everything.
  3. This is a recap, the content should have been covered in an earlier module.However, make the point that Isolated storage is available up to the capacity of the phone (at least 8GBytes or so). But it is slow to use and should only be used to persist non volatile data, for example word documents and media etc.State storage is phone memory set aside to hold the state information for dormant or tombstoned applications. This is very fast to use, but the amount available is limited, and it will be discarded if the phone is turned off.
  4. Start Visual Studio Open the project CaptainsLogin the folder Demo 1 CaptainsLog No StorageEnsure that the deployment target is set to Windows Phone EmulatorPress F5 to start the program running.Enter some text into the textbox in the Add Entry page.Click the Store buttonThe add entry textbox should clear as this text is added to the log.Enter some more text.Click the Store button again to store the next entry.Click the View Log button.This will show the two entries, with date and timestaps on them.Ask the class what will happen if you press the Back button on the phone.Answer: Since you are on a sub page you should be directed back to the parent one.Press Back and be directed back to the Add Entry page.Ask the class what will happen if you press the Back button again.Answer: Since this is the top menu, it should end the application.Press the Back button on the phoneand the application will stop.Press F5 to run the application again.Click the View Log button. Note that the log is empty now, as it was not stored when the program.Press Back to return to the Add Entry page.While the program is still running, and at the Add Entry page, open the file App.xaml.cs in Visual Studio (you might need to open the Solution Explorer to find this).Put a breakpoint at the start of the Application_Closing method.Return to the emulator and press Back to end the program. Note that the breakpoint is hit. Explain that we are going to add some code that will store the data on exit from the program and reload it on return.End the program.Clear the breakpoint for next time and exit Visual Studio.
  5. Make the point that for this reminder there is no recurrence. We are only boiling one egg.This can be set to daily, monthly, end of month and yearly.You can also set an expiration time when the reminder is to stop
  6. Make the point that, as with other tasks, even though a reminder has fired it will still exist in the system.If we want to, we can find that reminder and update it, alternatively we can delete the reminder and make a new one.
  7. The Picture Fetch program uses all the code shown above. It fetches a file into IsolatedStorage and then displays it on the screen.Start Visual Studio Open the project EggTimerin the folder Demo 4 EggTimerEnsure that the deployment target is set to Windows Phone EmulatorPress F5 to run the program.Set the slider to 1 minute.Press the Start Timer button.Keep the audience amused for a minute.When the notification fires, click in the notification to show how the navigation moves to the Egg Ready page.Stop the program and close Visual Studio
  8. Windows phone has the unique ability to provide the end user glanceable access to the information they care most about, via Live Tiles +Push Notifications offer developers a way to send timely information to the end user’s device even when the application is not running, including Tile updatesDevelopers cannot force a tile to StartTo add a tile to the Start screen, the end-user can tap and Hold in App List then select “Pin to Start”End-users can move, re-order, and remove from Start screen
  9. Tiles use a data driven template model. Every tile maps to a template that defines a set of data properties. Windows Phone 7.5 (Mango) supports “tile flip”. Developers can write to the back and front of a tile. Windows Phone automatically animates between front and back.
  10. Also new in Windows Phone 7.5 is ability to update front and back of tiles.Background InfoApplication TileCan be created by the user only when the user taps and holds the application name in the Application List and then selects pin to start. Properties are initially set in the Application Manifest. For more information, see How to: Set the Initial Properties for the Application Tile for Windows PhoneCannot be deleted. The Application Tile may or may not be pinned to Start. But even if the user has not pinned the Application Tile to Start, it can be updated programmatically such that its property data will be fresh should the user decide to pin it. Can be updated by:ShellTile APIs. The Application Tile is always the first item in the ActiveTiles collection, even if the Tile is not pinned to Start.Push Notifications for Windows PhoneShellTileSchedule APIsSecondary TilesCan be created only as the result of user input in an application. The application then uses the Create(Uri, ShellTileData) method to create a Tile on Start. Because the UI will navigate to Start when a new secondary Tile is created, only one secondary Tile can be created at a time.Can be deleted by: The user unpinning the Tile from Start.Uninstalling the application.Calling Delete()Can be updated by:ShellTile APIsPush Notifications for Windows PhoneShellTileSchedule APIs
  11. New API in Windows Phone 7.5 to support local tile updates.