Windows phone 8.1 Toast takes you to a specific page

I am working on a Windows 8.1 application that allows me to test errors on Restserver. If the server returns x number of errors, I would like to display x number of toasts. I already found a way to do this, but not the following:

I want that if you click on the toast, a specific page with parameters related to Toast is launched. Analog to Android, where you can put an intent with additional features in a toast.

The documentation tells me if I click a toast, I get a message in the overridden Onlaunch method ... somewhere. If I click on it, just enter the last page used.

Hope this question is clear, Sincere greetings

+4
source share
1 answer

When you click the toast, the OnLaunched method in the App class will still be called.

So, if you want to execute some logic based on your toasts, you should check the args.Arguments property in this method. This property will only matter if you set some data in the launch attribute on your XML toast.

The code looks like this: App.xaml.cs :

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

and payload toast:

 <toast launch="My_Parameter"> <visual> <binding template="ToastImageAndText01"> <image id="1" src="ms-appx:///images/redWide.png" alt="red graphic"/> <text id="1">Hello World!</text> </binding> </visual> 

+2
source

All Articles