locked
Intergration with Windows 8.1 Photos App Share Charm

    Question

  • I can not find any documentation on this anywhere, so excuse me if this is in a guide somewhere.

    I want my application to run whenever the user opens the native 'photos' app, then goes to the share option in the charms menu. My current computer says 'You don't have any apps that can share this content.' I want my application to appear there.

    I would like to do this in C#, but can use whatever is best.


    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums


    • Edited by UpTide Thursday, February 5, 2015 8:18 PM
    • Moved by Kristin Xie Friday, February 6, 2015 7:25 AM move to better forum
    Thursday, February 5, 2015 8:15 PM

Answers

  • To have your application appear in the Windows Charms (Share in this case) you need to add the "Share Target" declaration in the Package.appxmanifest then define which data formats your application is compatible with by adding them in the Data Format list.

    1st - Open Package.appxmanifest in Visual Studio

    2nd - Go to the Declarations tab

    3rd - Select the Share Target in the Available Declarations dropdown

    4th - Add the Data Formats you plan to support

    5th - Recompile!


    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

    • Marked as answer by UpTide Tuesday, February 10, 2015 7:30 PM
    Tuesday, February 10, 2015 7:30 PM

All replies

  • Hi,

    According to your description, you want your app can receives content shared from another app. If so, you have to declare that it supports the Share contract. This contract lets the system know that your app is available to receive content. If you're using a Visual Studio template to create your app, here's how you support the Share contract:

    1. Open the manifest file. It should be called something like package.appxmanifest.
    2. Open the Declarations tab.
    3. Choose Share Target from the Available Declarations list and click Add.

    For more information, please see the link:

    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh871369.aspx

    And see the Sharing content target app sample

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Friday, February 6, 2015 7:41 AM
  • Is the only way to integrate with the charms through a 'store' app? I am developing this application for internal use. The plan is to have no GUI even. Just in the photo app select a photo then open the charms, hit share, select send to server and it copies to a file server.

    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

    Friday, February 6, 2015 3:14 PM
  • Hi,

    You have a photo app and want to share the image in the app to a server based on s share charm. Am I right?

    If you want to share content to a server with the share charm, you should create an target app to get the share content then send the content to server. That's necessary in windows store app if you want to share content based on charm.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.


    Sunday, February 8, 2015 6:33 AM
  • I can make a simple console app to transfer the file over the network.

    So what I will do is have an icon in the share charm that saves a copy of the photo selected into an appdata folder. From there the other application will handle everything.

    All the application will need to do:

    1- Appear in the share charms.

    2- Get which file which was chosen from windows.

    3- Copy the file Windows says was selected to a local directory.

    I can figure out two and three, it is just getting my application to appear in the share charms that is the problem.


    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums



    • Edited by UpTide Monday, February 9, 2015 11:50 PM
    Monday, February 9, 2015 11:49 PM
  • Hi,

    I recommend you can create a windows store app instead of C# console app to handle transfer the file over the network. You can make the app as a share target app by implement share contract. Then the app can appear in the share charm. For file transfer over network you can see the API in store app:

    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh757628.aspx

    And for how to make a console app appear to share charm, I think that's out of support in the forum.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Tuesday, February 10, 2015 9:53 AM
  • To have your application appear in the Windows Charms (Share in this case) you need to add the "Share Target" declaration in the Package.appxmanifest then define which data formats your application is compatible with by adding them in the Data Format list.

    1st - Open Package.appxmanifest in Visual Studio

    2nd - Go to the Declarations tab

    3rd - Select the Share Target in the Available Declarations dropdown

    4th - Add the Data Formats you plan to support

    5th - Recompile!


    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

    • Marked as answer by UpTide Tuesday, February 10, 2015 7:30 PM
    Tuesday, February 10, 2015 7:30 PM