Professional Documents
Culture Documents
Andy Wigley | Microsoft Technical Evangelist Rob Tiffany | Microsoft Enterprise Mobility Strategist
This App
async
50:00
50:00 60:00 50:00 25:00 25:00 30:00
50:00
35:00
35:00 25:00 25:00 60:00 50:00 50:00
50:00
50:00
Module Agenda
Auto-Launching with File and Protocol Associations Launching Apps to Handle Particular File Types Launching one App from Another
12/4/2012
type, via:
an email attachment a website via Internet Explorer a text message a Near Field Communications (NFC) tag another app from the Store Protocol association allows your app to automatically launch when another app launches a special URI Protocol is the first part of a URI, e.g. myprotocol:/ShowProducts?CategoryID=aea6ae1f Your app launches another and passes it data in the remainder of the launch URI
If there is only one app on the phone registered for that file or
protocol, the app is automatically launched If there is more than one app registered for that file or protocol, the user is asked which app they want to use If no apps on the phone can handle that file or protocol, the user is given the option to get one that does
URI is different
Windows 8 has a default Store app for a file type or URI, so that will be launched In Windows Phone 8, if there are multiple Store apps installed that can handle a particular file or protocol association, the user chooses the receiving app from a menu
File Associations
Optionally supply logos that Windows Phone OS will use when listing files
Logo Size
Small Medium Large
Use
Email attachments Office hub list view Browser download
Dimensions
33x33 pixels 69x69 pixels 176x176 pixels
FileTypeAssociation designates that the source of the URI is a file type association
You need to implement a custom URI Mapper to parse the deep link URI and map to a page in your app that will handle it
SharedStorage
Local Storage
If you try to reserve a file association using one of the reserved types, the reservation
request will be ignored See the documentation for a full list of the reserved file types
20
12/4/2012
Protocol Associations
Protocol Associations
Protocol association allows your app to automatically launch when another app launches a
special URI
The URI begins with a protocol name that your app has registered for For example, contoso is the protocol name in the following URI:
contoso:ShowProducts?CategoryID=aea6ae1f-9894-404e-8bca-ec47ec5b9c6c
After the colon, the rest of the URI can be set to whatever you want
Extensions element
The Extensions element must follow immediately after the Tokens element Maximum of 10 protocol associations per app
<Extensions> <Protocol Name= "contoso" TaskID="_default" NavUriFragment="encodedLaunchUri=%s"> </Extensions>
your app
/Protocol?encodedLaunchUri=contoso:ShowProducts?CategoryID=aea6ae1f Protocol designates that the source of the URI is a protocol association The full encoded launch URI
Implement a custom URI Mapper to parse the deep link URI and map to a page in your
Launching a URI
Use the LaunchUriAsync method to launch another app that is registered for that protocol
private void Button_Click_1(object sender, RoutedEventArgs e) { // Launch a protocol Windows.System.Launcher.LaunchUriAsync(new Uri("jumpstart:NewSession")); }
If you try to reserve a protocol association using one of the reserved protocols, the
reservation request will be ignored See the documentation for a full list of the reserved protocols
URI scheme
http:[URL] mailto:[email address]
ms-settings-accounts: ms-settings-airplanemode:
Description
Launches the web browser and navigates to the specified URL.
Launches the email app and creates a new message with the specified email address on the To line. Note that the email is not sent until the user taps send. Launches the Account Settings app. Launches the Airplane Mode Settings app.
ms-settings-bluetooth:
ms-settings-cellular: ms-settings-emailandaccounts: ms-settings-location:
ms-settings-lock:
ms-settings-wifi:
Description
Launches the Windows Phone Store and shows the details page for the specified app. Launches the Store and shows the review page for the calling app. Launches the Store and shows the review page for the specified app. Launches the Store and searches for the specified content. Launches the Store and searches for apps by keyword. Launches the Store and searches for items by publisher name. Launches the Windows Phone Store and shows the details page for the specified app. Launches the Store and shows the review page for the calling app. Launches the Store and shows the review page for the specified app. Launches the Store and searches for the specified content.
Summary
App can register to handle particular file types
When the user opens a file from a website, email message or SMS message, your app is
launched to process the file One app can launch another by launching a file of a type for which the second app has
The information herein is for informational purposes only an 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.
2012 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.