locked
Can I launch app through share target charm

    Question

  • Hi,

    My app implements share target. When user swipes from the side of the screen to display the share charm. My app is listed in the share window. When my app is clicked from the list, it opens in the share window. Is there any way to not launch the app in share window but directly launch in system main window just like when user clicks app's tile on start screen?

    Thanks,

    Fan


    Fan

    Wednesday, August 29, 2012 5:21 AM

Answers

  • There are 3 ways to run/call an application:

    • Launch - when you click on tile or second tile in start screen
    • Share Mode - when the share charm is called and the application is selected
    • Search - when the search charm is called and the application is selected

    In App.xaml.cs you need to declare each type of call.

    If you call an application using a share contract it only runs through share contract and the activated window is hosted in share charm flyout and it´s not possible to call it by Launch Mode because the OnLaunched is not called but yes OnShareTargetActivated is called.

    Note: Don´t forget the purpose of share contract!

    I worked in application that had the same behavior in share mode and launch mode and i had some problems. You can see this:

    http://www.slideshare.net/saramgsilva/share-contract-problems-attempts-solutions


    Sara Silva


    • Proposed as answer by smsilvaMVP Wednesday, August 29, 2012 10:12 AM
    • Edited by smsilvaMVP Wednesday, August 29, 2012 10:15 AM
    • Marked as answer by Jesse Jiang Monday, September 3, 2012 7:14 AM
    Wednesday, August 29, 2012 10:11 AM