locked
Question on share contract

    Question

  • can we use share contract to provide custom settings during video playback? For ex: if i am playing a video and want to modify video settings, can a third party metro app provide these settings through share contract?

    Tuesday, October 18, 2011 9:21 AM

Answers

  • This scenario is not supported by Settings and we would not recommend using Share in this manner as a workaround. 

    Settings contract is also only reserved for applications for their own settings and cannot be implanted by 3rd parties on behalf of the application.

    Share data transfer only happens in one direction, specifically from the Source application (app in the main view) to the Target application (the app that was selected and shown in the Share panel.  It does not support real-time bi-directional data transfer.  Also, the currency for data transfer in  for Share is in the form of a DataPackage, which supports custom formats but not API calls.   You can learn more about DataPackage here:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.datatransfer.datapackage(v=VS.85).aspx

    In this case, your application would need to be the SOURCE application (opened in the foreground) and users would have to choose the video from the Share Target list.   Since this is a very unique scenario and there is no guarantee that users will have video playback applications that would work this way and exist as Share Targets. 

     

    Hope this helps.

    Wednesday, October 26, 2011 6:02 PM

All replies

  • If you are considering sharing a video with accompanying settings, that would be a custom data format in the DataPackage.

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.datatransfer.datapackage(v=VS.85).aspx

    This talk by Billie Sue Chafins and Steve Seixeiro mention this, but recommend using a standard format if at all possible. (slide 11 and onward)

    http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-405T

    Thanks, David

     

    Wednesday, October 19, 2011 1:23 AM
    Moderator
  • thanks david. My requirement is as follows.

    I want my custom video settings [ex: denoise] to come up as part of settings page [in context settings] when user plays any video. Essentially there is no sharing between the video being played and my app. However i want my app to come up whenever user plays any video. Can you tell me how to achieve this?

    Wednesday, October 19, 2011 3:04 AM
  • This scenario is not supported by Settings and we would not recommend using Share in this manner as a workaround. 

    Settings contract is also only reserved for applications for their own settings and cannot be implanted by 3rd parties on behalf of the application.

    Share data transfer only happens in one direction, specifically from the Source application (app in the main view) to the Target application (the app that was selected and shown in the Share panel.  It does not support real-time bi-directional data transfer.  Also, the currency for data transfer in  for Share is in the form of a DataPackage, which supports custom formats but not API calls.   You can learn more about DataPackage here:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.datatransfer.datapackage(v=VS.85).aspx

    In this case, your application would need to be the SOURCE application (opened in the foreground) and users would have to choose the video from the Share Target list.   Since this is a very unique scenario and there is no guarantee that users will have video playback applications that would work this way and exist as Share Targets. 

     

    Hope this helps.

    Wednesday, October 26, 2011 6:02 PM