1
votes

I'm trying to send push notifications using the Parse .Net SDK to both Android and iOS:

ParsePush push = new ParsePush();
Dictionary<string, object> pushData = new Dictionary<string, object>()
{
    {"alert", message},
    {"sound", ""},
    {"badge", 0},
    {"uri", "http://blog.parse.com"},
    {"category", category}
};
push.Data = pushData;
push.Query = query;
push.SendAsync().Wait();

I receive the following error if I try to define the "uri" parameter:

Client-initiated push cannot use the "uri" option

It doesn't mention anything in the documentation that you can't send the uri from a client. Is it really only possible via the Parse console?

Thanks!

1

1 Answers

0
votes

In case anyone is interested. You cannot send a "uri" with a push from a client. Easiest way to differentiate different push types from Parse is to use the category and then extend the ParsePushBroadcastReceiver from Parse in Android to capture the onClick event of the push notification yourself. From there you can then check the category name.