Presentation is loading. Please wait.

Presentation is loading. Please wait.

Share: Your app powers the Windows 8 share experience

Similar presentations


Presentation on theme: "Share: Your app powers the Windows 8 share experience"— Presentation transcript:

1 Share: Your app powers the Windows 8 share experience
12/28/2018 6:18 AM APP-405T Share: Your app powers the Windows 8 share experience Billie Sue Chafins Senior Program Manager Lead Microsoft Corporation Steve Seixeiro Partner Development Manager © 2010 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.

2 Agenda Overview of the Windows Share contract
Demonstration of how Share works in Windows 8 Best Practices for integrating with Windows Share Coding against the contract You’ll leave with examples of how to Quickly and easily turn your app into a Share source Create exciting experiences as a Share target

3 Users often come across information they’re excited to share with someone or utilize in another app.

4 Share provides a lightweight, in context, easy experience for accomplishing this.

5 Sharing is universally accessible and always just a single swipe away.

6 Windows Share in action
demo Windows Share in action

7 Windows does the heavy lifting so that apps don’t need to know much about each other in order to create amazing experiences!

8 Every new app that integrates with Share extends the sharing possibilities!

9 Sharing from Source to Target
Source App Share Broker Share Target App Registers with the DataTransfer Manager User selects “Share”, active app is sent event Receives event and fills DataPackage Filters list of Target Apps and Quicklinks Completes async calls and returns User selects Target App or Quicklink Activated for sharing Activate Target as kind shareTarget Processes DataPackage contents DataPackage lives in source application Reports Complete

10 The Data Package

11 Share currency – the DataPackage
Share data in a number of formats Standard formats: text, URI, HTML, images, … Extensible formats

12 Source apps should include as many representations of the data as possible to maximize the set of target apps.

13 Data Package APIs and Properties
dataTransferManager.addEventListener("datarequested", function (e) { // Common properties var request = e.request; request.data.properties.title = "Title for data"; request.data.properties.description = "Description of the data"; request.data.properties.thumbnail = thumbnail; // of type StreamReference // Common methods request.data.setText("Text to share"); request.data.setHtml("<HTML …>"); request.data.setUri(uri /* of type Uri */); request.data.setBitmap(stream /* RandomAccessStream */); // Custom data request.data.setText("FormatID", "Text to share"); request.data.setData("FormatID", datastream /* RandomAccessStream */);

14 The Source app

15 Anticipated Categories of Source Apps
News Magazine Media Games Social networking Note taking Cloud storage etc

16 Things to consider as a Share source app
Listen for and handle a Share event to participate Content can be shared in two ways: Implicit – user selects Share without making a selection Explicit – user selects content in an app and then selects Share Build your data package for best results

17 Setting up a Share Source app
// set up data transfer manager var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView(); // create event listener to be called on to fill out data package dataTransferManager.addEventListener("datarequested", function (e) { // fill in data package with what to share var request = e.request; request.data.properties.title = "Title for data"; request.data.properties.description = "Description of the data"; request.data.setText("Text to share"); ... });

18 Your app can light up as a Share source in just minutes!

19 The Target app

20 Anticipated Categories of Target Apps
Social networking Communication Entertainment Print service Device connected Note taking Cloud storage etc

21 Things to consider as a Share target app
Register as a Share target and specify the formats you accept Build your app UI to look best as part of the Share experience Selection of people or places to Share within your app Quick, lightweight experience Use the DataPackage to tailor the user experience Report completion Return a Quicklink

22 Being a Share target will increase usage of your app or service and keeps your service fresh with content that matters to users.

23 Setting up a Share Target App
<!– extension needs to be added to package.appxmanifest --> <Extensions> <Extension Category="windows.shareTarget" StartPage="shareTarget.html"> <ShareTarget> <SupportedFileTypes> <FileType>.jpg</FileType> </SupportedFileTypes> <DataFormat>text</DataFormat> </ShareTarget> </Extension> </Extensions> ... // activation function in shareTarget.js function activated(e) { if (e.kind === Windows.ApplicationModel.Activation.ActivationKind.shareTarget) { share = e.shareOperation; document.querySelector('.metadata h1').textContent = share.data.properties.title; document.querySelector('.metadata p').textContent = share.data.properties.description;

24 Recap: Sharing from Source to Target
Source App Share Broker Share Target App Registers with the DataTransfer Manager User selects “Share”, active app is sent event Receives event and fills DataPackage Filters list of Target Apps and Quicklinks Completes async calls and returns User selects Target App or Quicklink Activated for sharing Activate Target as kind shareTarget Processes DataPackage contents DataPackage lives in source application Reports Complete

25 Participating in Share from Source to Target
demo Participating in Share from Source to Target

26 Recap

27 By integrating with Share …
Your app will connect customers to the people and apps they care about. Customers will easily share content from your app through other apps installed on their PC. The Share landscape is ever-evolving The more apps, the more sharing opportunities!

28 Related sessions [APP-395T] Designing Metro style: principles and personality [APP-398T] How to declare your app’s capabilities

29 Further reading and documentation
Quickstart: Sharing and Receiving content Guidelines and checklist for sharing content Share Source and Target SDK Samples API Reference Questions? Please visit the forums on the Windows Dev Center at For best response, please include the Build Session # in the title of your post

30 thank you Feedback and questions http://forums.dev.windows.com
Session feedback

31 12/28/2018 6:18 AM © 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. © 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.

32


Download ppt "Share: Your app powers the Windows 8 share experience"

Similar presentations


Ads by Google