AmolGujar / apns-sharp

Automatically exported from code.google.com/p/apns-sharp
0 stars 0 forks source link

Notification Payload action-loc-key #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Apple Local and Push Notification Programming Guide,
section "The Notification Payload" says that the
child property of the alert property 'action-loc-key'
can be a string or null. I will use 'null' because I only
want to display a single OK button. This is not possible.

When I set
alertNotification.Payload.Alert.ActionLocalizedKey = "";
or
alertNotification.Payload.Alert.ActionLocalizedKey = null;
the key in JSON payload does not appear.

Is this an isseau ?
I think yes, but an easy fix would be
alertNotification.Payload.Alert.ActionLocalizedKey = "";
and fix NotificationPayload.cs method 'ToJson()'
Here check only 
this.Alert.ActionLocalizedKey == null
and not
string.IsNullOrEmpty(this.Alert.ActionLocalizedKey)

This works fine for me and I get only the OK button in
my app...

Christian

Original issue reported on code.google.com by christia...@netpioneer.de on 10 Feb 2011 at 8:42

GoogleCodeExporter commented 9 years ago
I'll look into this more.. May be a case that I didn't really dig into the spec 
from apple enough and haven't tried using it in this way...

Original comment by jond...@gmail.com on 14 Feb 2011 at 7:43

GoogleCodeExporter commented 9 years ago

Original comment by jond...@gmail.com on 14 Feb 2011 at 7:45