400 likes | 559 Views
App-to-App Communication. Sean McKenna Program Manager, Windows Phone seanmck@microsoft.com 2-212. What is App-to-App Communication?. In the beginning…. Extending apps with the phone. Your App. What about the other way…?. Extending the phone with apps. And finally….
E N D
App-to-App Communication Sean McKenna Program Manager, Windows Phone seanmck@microsoft.com 2-212
Extending apps with the phone Your App
Custom URI Associations • Launch other apps to complete tasks • Play an album on Spotify • Play a video in YouTube • Post an update to Facebook • Launch device settings • Link your app into core experiences • Browser • Messaging • Email Launcher.LaunchUriAsync(newUri("myapp:foo=1&bar=2"));
File Type Associations • Launch files in the right app • Microsoft Office • Adobe Reader • Hike & Bike • Handle custom files in your app • Browser • Email • Office Hub varpdfFile = awaitStorageFile.GetFileFromApplicationUriAsync(newUri("ms-appdata:///Local/mydoc.pdf")); Launcher.LaunchFileAsync(pdfFile);
Useful built-in file types Microsoft Word documents Microsoft PowerPoint presentations Microsoft Excel spreadsheets
A Look Under the Hood Data Sharing Service Create file brokering token Redeem token for file Target App Source App Execution Manager Launch by file: Foo.bar TokenID = 1234 Launch target with token Get handlers for ‘.bar’ Package Manager
Guiding Principles • User is always in control • Apps cannot take over an extension • The list of installed apps is private user data • Apps cannot query installed apps, URI associations, or file extensions • Standard tasks should be simple and predictable • Standard types are handled by built-in experiences
One Handler Launch URI: skype:call?5551234
Using URI Associations to Extend Your App Spotify spotify:album:<albumID> spotify:track:<trackID> YouTube vnd.youtube:<videoID>
Using URI Associations to Extend Your App Facebook fb:profile[?id=<profileId>] fb:events[?id=<eventId>] fb:groups[?id=<groupId>] fb:pages[?id=<pageId>] fb:post?text=<textToPost> Foursquare foursquare://venues/<venueID> foursquare://checkins/<checkinID> foursquare://tips/<tipID> foursquare://users/<userID>
Using URI Associations to Extend Your App Here Drive (+others) ms-drive-to:?destination.latitude=<latitude> &destination.longitude=<longitude> &destination.name=<name> Here Maps (+others) ms-walk-to:?destination.latitude=<latitude> &destination.longitude=<longitude> &destination.name=<name>
Target apps Your app can be launched based on a URI sent from another device Handler code is exactly the same Proximity capability is not required Source apps You can launch apps on other devices using the Proximity APIs App Launching via Proximity
Coming Soon: Facebook Single Sign-On
Facebook Single Sign-On • Register your app with Facebook Dev Portal • Invoke auth with FB AppIDand requested permissions • Handle reactivation when user returns from Facebook app
Facebook Single Sign-On Facebook App Your App
Recap • Use URI schemes and file associations to extend your app • Support your own schemes and file types for exposure • Help us evangelize and catalog these extensions
THANK YOU! • Sean McKenna • seanmck@microsoft.com
Q&A • Sean McKenna seanmck@microsoft.com
Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session • Scan this QR codeto evaluate this session and be automatically entered in a drawing to win a prize!
Facebook Single Sign-On • Register your app with Facebook Dev Portal • Invoke auth with FB AppIDand requested permissions • Handle reactivation when user returns from Facebook app
Facebook Single Sign-On Facebook App Your App