Windows Notification Messages missing deep link info

When I'm using the Push API does anyone know which field to add to the 'toast' section of the wns payload ( to get a deep link URL passed to a Windows 8/10 app?

The use case I need is tapping on a notification while the app is not running and having it launch a certain page based on the deep link URL. Ideally the deep link data would be available in the 'argument' field of the App's on launch event, or if one of the PushManager.Shared event handlers get hit after the app launches.

Didn't find what you were looking for?

New post


1 comment

  • Hi Andres,

    With Windows, the method of deep-linking is done via the Toast Launch parameter. Within this parameter, you will be passing in the full name of the .xaml file that you want the push to deep-link to and open.

    As an example, your API request should look like this:

    curl -X POST -u "[APP KEY]:[MASTER SECRET]" -H "Content-Type:application/json" -H "Accept: application/vnd.urbanairship+json; version=3;" --data '{"audience":"all","notification":{"wns":{"toast":{"launch":"[NAME OF APP FILE].xaml","binding":{"text":["This is a test WNS toast notification with deep link launch parameter."],"template":"ToastText01"}}}},"device_types":["wns"]}' 

    Within your Windows application then, you'll need to handle the opening of that specific page. This can be done within your OnLaunched override method.
    So, you might have something like this:

    if (rootFrame.Content != null && args.Arguments != null && args.Kind == ActivationKind.Launch)//Check if the OnLaunch was called with a "Launch" parameter and an argument 
    rootFrame.Navigate(typeof([TYPE OF PUBLIC SEALED CLASS NAME OF THE DESTINATION]), args.Arguments);//Navigate to deep link parameter 

    Once you perform those steps, you will be able to deep-link to the appropriate area within your app.

    Comment actions Permalink

Please sign in to leave a comment.