Charles Petzold www.charlespetzold.com Launchers and Choosers.

Slides:



Advertisements
Similar presentations
What we will cover today… Where is the camera on my phone? Taking a photo Zoom in and out Deleting a photo Where do my photos go to? Viewing my photos.
Advertisements

Charles Petzold Application Lifecycle and State Management.
Programming with Android: Activities and Intents Luca Bedogni Marco Di Felice Dipartimento di Informatica – Scienza e Ingegneria Università di Bologna.
Understanding Mobile App Development Concepts and Working with APIs Lesson 6.
Confidential [Worldwide] Live Demo 1.0 Installation via USB SOP for A80.
Lecture 7: Real Time Applications. Tasks, and Storage CSS290: APPS ON MOBILE DEVICES.
Citizens’ Engagement App. Find Android Marketplace on your phone.
Building Windows Phone Applications with Silverlight Nguyen Thanh Tung Project Manager - MISA JSC.
1 of 6 Parts of Your Notebook Below is a graphic overview of the different parts of a OneNote 2007 notebook. Microsoft ® OneNote ® 2007 notebooks are digital.
Building Windows Phone Applications with Silverlight Your Name.
Using Phone Resources Rob S. Miles | Microsoft MVP | University of Hull, UK Andy Wigley | Microsoft MVP | Appa Mundi Session 8.0.
Designing and Developing a Windows Phone 7 Application in Silverlight End-to-End.
Pocket Brewer On hand tools for the average homebrewer.
OneNote 2013 May 13, 2015 Tech Talk Odegaard 220 Greg Frick May 13, 2015 Tech Talk Odegaard 220 Greg Frick.
Course :: Certificate in Basic Computers Applications for End Users Introducing Window 7.
Charles Petzold Navigation.
Windows Phone 7 Development Tomer Shamam Senior Architect Sela Group.
WPH304. announcement LINQ to SQL LINQ to User Data.
Windows XP 101: Using Windows XP Professional in the Classroom.
StressChill App Click the StressChill icon (shown to the right) to open the app. If you do not see this on the desktop, you will find it in the pull up.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Microsoft Outlook Web Application (OWA)
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
IV.Creating & Editing a Video/Movie. Editing Techniques To open a project On the File menu, click Open Project. In the File name box, locate the saved.
Unit B: Expanding Your Productivity Page: 24 to 37.
In addition to Word, Excel, PowerPoint, and Access, Microsoft Office® 2013 includes additional applications, including Outlook, OneNote, and Office Web.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
INTRODUCTION TO OFFICE 365 How To Share and Organize All In One Secure Place Panagiota “Penny” Damianeas Assessment & Testing Specialist.
CMPF124 Personal Productivity with Information Technology Chapter 1 – Part 3 Introduction To Windows Operating Systems Windows Accessories Introduction.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
AgileZoom 1.3 interactive portfolios you can share Getting Started (swipe left to advance)
1 WCAG2 for ICT Working Draft.
Windows Phone Application Development Using C#/XAML.
Mary Immaculate College 9 th Nov. Objectives Participants will be enabled to: Create and maintain your school’s website using Scoilnet Blogs Add other.
End of Day Tasks!. THE CHALLENGE…. Select either a list or a library to create Add x3 items or documents one item or document inside of.
Microsoft ® Outlook 2000 Managing and Integrating Outlook Components.
ONE® Pages Training Presentation North York General Hospital.
CMPF124 Basic Skills For Knowledge Workers Chapter 1 – Part 3 Introduction To Windows Operating Systems Windows Accessories Introduction To Windows Operating.
1 Mezzanine Ware (Pty) Ltd © 2014 Installing\Uninstalling the Mezzanine Helium Android application.
private void mailButton_Click(object sender, RoutedEventArgs e) { sendMail("From JotPad", jotTextBox.Text); }
Building Windows Phone Applications with Silverlight Jaime Rodriguez
Windows Movie Maker. Definition You can use Windows Movie Maker to capture audio and video to your computer from a video camera, Web camera, or other.
OWA Training Outlook Web Access Basics: , Calendars, and Contacts.
Websites with Weebly are easy!. What is Weebly? Weebly is a free website creator. It is very easy to use. If you feel comfortable creating documents with.
Building Windows Phone Applications with Silverlight (Part 1) Mike Harsh Program Manager, Microsoft.
private void page2Button_Click(object sender, RoutedEventArgs e) { NavigationService.Navigate(new Uri("/PageTwo.xaml", UriKind.RelativeOrAbsolute));
/* Life runs on code */. Introduction to Windows Phone Kamalakannan Annamalai Windows Phone Developer Ilink Systems Twitter : kanal_7
CMPF124 Personal Productivity with Information Technology Chapter 1 – Part 3 Introduction To Windows Operating Systems Windows Accessories Introduction.
REC [ ] How to implement CAMERA RECORDING for USB WEBCAM or IP CAMERA in C#.NET SOURCE CODE: ! Welcome to this presentation that explains.
Exploring Networked Data and Data Stores Lesson 3.
Twitter Part One – The Fundamentals. First things first… What is Twitter? Social networking platform Short messages – 140 characters maximum Relaxed,
ANGEL Penn State’s Course Management System Created by PSY Office of C&IS.
Programering af mobile enheder Windows Phone Uge 9 Part 1.
Mac OS 10.5+, Win XP sp2, Linux. webbrowser webbrowser  The web browser is arguably the most important piece of software on your computer. web browser.
Daniel Tizon Semior Consultant, Microsoft Regional Director ANURA-SOLSTEAM Développez pour Windows Phone 7.
How to set up a My Bookshelf account. In your web browser go to: Enter your school or library’s login.
Knowledge Hub Walkthrough August
Knowledge Hub Walkthrough August
Lecture 2: Android Concepts
Complete Walkthrough For Website & Mobile App
Windows 10.
Windows Phone 7 advanced services
Windows Phone Platform Integration Yochay Kiriaty
Introduction to mobile app development Module 2 – Getting started with apps and App Studio Lance McCarthy.
App-to-app communication
Activities and Intents
First Class User Experience Journey
First, go to iFundraise.ie/StewartsSchool and click START FUNDRAISING
How to Set up Privacy Functions
Presentation transcript:

Charles Petzold Launchers and Choosers

Agenda Launchers Choosers Photo extras Tombstoning

Tasks target phone's built-in apps –Launch Web browser, camera app, etc. –Microsoft.Phone.Tasks namespace Some tasks are activated with launchers –Launches app but doesn't return data –e.g., compose or place phone call Others are activated with choosers –Launches app and returns data –e.g., snap a photo or choose an address Launchers, Choosers, and Tasks

Launcher Tasks ClassDescription ComposeTask Launches the app MarketPlaceDetailTask Launches the marketplace app showing a product detail MarketPlaceHubTask Launches the marketplace app showing the hub MarketPlaceReviewTask Launches the marketplace app showing a product review MarketPlaceSearchTask Launches the marketplace app showing search results MediaPlayerLauncher Launches the media player app PhoneCallTask Launches the phone app SearchTask Launches the search app SmsComposeTask Launches the text-messaging app WebBrowserTask Launches the Web browser

Launching a Phone Task PhoneCallTask task = new PhoneCallTask(); task.PhoneNumber = " "; task.DisplayName = "Wintellect"; task.Show();

Launching an Task ComposeTask task = new ComposeTask(); task.To = task.Cc = task.Body = "This is a test"; task.Subject = "Test Message"; task.Show();

Launching a WebBrowserTask WebBrowserTask task = new WebBrowserTask(); task.URL = " task.Show();

Chooser Tasks ClassDescription CameraCaptureTask Launches the camera app and returns a photo AddressChooserTask Allows the user to choose an address from the contacts list PhoneNumberChooserTask Allows the user to choose a phone number from the contacts list PhotoChooserTask Allows the user to choose a photo from the photos app Save AddressTask Allows the user to save an address in the contacts list (returns completion indicator but no data) SavePhoneNumberTask Allows the user to save a phone number in the contacts list (returns completion indicator but no data)

Snapping a Photo private CameraCaptureTask _task;... _task = new CameraCaptureTask(); _task.Completed += new EventHandler (OnCaptureCompleted); _task.Show();... private void OnCaptureCompleted(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { Stream photo = e.ChosenPhoto;... }

Choosing a Photo private PhotoChooseTask _task;... _task = new PhotoChooserTask(); _task.Completed += new EventHandler (OnSelectionCompleted); _task.Show();... private void OnSelectionCompleted(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { Stream photo = e.ChosenPhoto;... }

demo Launchers and Choosers

Photo Extras Applications invoked through "extras…" item in picture library menu –Item only appears if one or more extras are installed Work as stand-alone apps, too

Extras.xml file registers app for photo extras –Must be named Extras.xml –Build action must be "Content" Extras.xml true

Retrieving a Photo protected override void OnNavigatedTo(NavigationEventArgs e) { if (NavigationContext.QueryString.ContainsKey("token")) { // If app was invoked through Extras menu, grab the photo MediaLibrary library = new MediaLibrary(); Picture picture = library.GetPictureFromToken (NavigationContext.QueryString["token"]); // Display the photo in XAML Image object named "Photo" BitmapImage bitmap = new BitmapImage(); bitmap.SetSource(picture.GetImage()); Photo.Source = new WriteableBitmap(bitmap); }

demo Photo Extras

Some tasks may not cause tombstoning –CameraCaptureTask – AddressChooserTask –MediaPlayerLauncher –PhoneNumberChooserTasks –PhotoChooserTask Other tasks do cause app to be tombstoned All apps should support tombstoning! Tombstoning

Completed events fire before OnNavigatedTo If tombstoned data is required in Completed event handler, use application state, not page state Completed Events Launching OnNavigatedTo OnNavigatedFrom Deactivated Activated PhotoChooserTask.Completed OnNavigatedTo Launching OnNavigatedTo OnNavigatedFrom Deactivated Activated PhotoChooserTask.Completed OnNavigatedTo

This Works // PhotoChooserTask.Completed event handler private void OnSelectionCompleted(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { // Retrieve tombstoned data from application state int index = (int)PhoneApplicationService.Current.State["Index"];... }

This Does Not // PhotoChooserTask.Completed event handler private void OnSelectionCompleted(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { // Retrieve tombstoned data from page state int index = (int)this.State["Index"];... }

Charles Petzold Questions?