Export to GitHub

apns-sharp - issue #46

Notification Payload action-loc-key


Posted on Feb 10, 2011 by Happy Elephant

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

Comment #1

Posted on Feb 14, 2011 by Happy Lion

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...

Comment #2

Posted on Feb 14, 2011 by Happy Lion

(No comment was entered for this change.)

Status: Accepted

Labels:
Type-Defect Priority-Medium