c# - WP8 Parse send push notification with custom Param -
from here, see can send toast notification opens specific page when user taps it, want. push message should this:
string message = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<wp:notification xmlns:wp=\"wpnotification\">" + "<wp:toast>" + "<wp:text1>title</wp:text1>" + "<wp:text2>message</wp:text2>" + "<wp:param>/page2.xaml?navigatedfrom=toast</wp:param>" + "</wp:toast>" + "</wp:notification>";
equivalently in parse (i'm not 100% sure):
push.data = new dictionary<string, object>{ {"title", "title"}, {"alert", "message"}, {"param", "/page2.xaml?navigatedfrom=toast"} };
the toast displayed correctly when app closed. tapping open default page instead of page2.xaml. , parse seems replace "param" string long string. this:
{[wp:param, ?pushjson=%7b%22title%22:%22title%22,%22alert%22:%22message%22,%22param%22:%22/page2.xaml?navigatedfrom=toast%22,%22push_hash%22:%2278e731027d8fd50ed642340b7c9a63b3%22%7d]} system.collections.generic.keyvaluepair<string,string>
so how can make toast open page2.xaml on tap?
Comments
Post a Comment