Metro Style Toast notification retrieval when the app is terminated


  • Hello everybody,

    The question and it's context at hand is the following:

    On Windows 8 (not Win8 Phone) I have a metro-style client application which talks to WNS and gets an URI. This URI is sent to a web service. After a while, the app terminates (not suspend). The web service sends a toast notification to the app through WNS with some extra content inside a custom xml element.

    Windows 8 receives the toast and shows it on the screen. The user clicks/taps the toast and the client app launches.

    The question is: is there any way to get the content of this custom toast notification that started the app and the user taped?

    I am aware of the fact that I can register for the push event, but from what I've seen, this works only for suspended apps, not shutdown apps.

    Best regards, Gabriel Iacob

    Wednesday, August 22, 2012 8:08 AM

All replies

  • Hi Gabriel,

    When the user taps on the toast notification, the application can be activated. The OnLaunched event will be fired and you can check the LaunchActivatedEventArgs.Arguments property to get the content on which the user tapped.

    protected override void OnLaunched(LaunchActivatedEventArgs args)
        string launchString = args.Arguments


    Thursday, August 23, 2012 5:48 PM
  • Hi Sagar,

    As far as I tried, args->Arguments gives the string of the launch parameters, not the entire body of the toast.

    Thanks for pointing out, though.

    Friday, August 24, 2012 1:43 PM