WP8 Notification Param

0 votes

Hello, 

I develop a app for wp8.

When the app is active the notification sent from the App42 portal arrive correctly

Whe the app is not active it appear as notification and when I tap on it will open the application 

but I can't read the message.

I the documentation I found:

       protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            //  If we navigated to this page
            // from the MainPage, the DefaultTitle parameter will be "FromMain".  If we navigated here
            // when the secondary Tile was tapped, the parameter will be "FromTile".
            textBlockFrom.Text = "Navigated here from " + this.NavigationContext.QueryString["NavigatedFrom"];

        }

But when I use this and when I tap on the message in the notification bar the query string is always empty.

reading on internet see that the format of notification can contain this values:

wp:text1 (In this fiels I found the message)

wp:text2 (never found )

wp:Param (never found)

 

In particulari in the wp:Param I read that I can setup the query string for the app.

Can you help me ?

I need to read the notification received whe app is in background or not active.

 

Best regards

Gabriele Fain

 

asked Jun 1, 2015 in App42 Cloud API-BaaS by odf (37 points)

1 Answer

+1 vote
 
Best answer
Hi Gabriele Fain,
 
Apologies for getting late back to you.
 
For sending param with push notification please read our tutorial http://api.shephertz.com/tutorial/Push-Notification-WindowsPhone/#sending-toast-message-to-useryou can add parameters somethong like
 
String param = /MainPage.xaml?ID=1
 
There is not direct way to read push notification in background but you can achieve this by using background agents provided by Windows phone for detail please have a look on this link also.
 
 
Let me know if it helps.
 
Thanks,
Himanshu Sharma

 

answered Jun 4, 2015 by hs00105 (2,005 points)
selected Jun 4, 2015 by odf
Hello,
I cannot use SendPushToastMessageToUser because I send the notification from a java program that send notification to the user, and I don't know if the user have a IOS, ANDROID or WP8 phone.
So I use the sendPushMessageToUser function that is generic, but I need to add the param for toast.

There is a way to do this ?
Best regards
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...