I'm using javaPNS. The API provides simple to use payload methods to construct various standard payloads. But I also want to send some custom values in the payload that will serve as additional parameters for the app, (it is permissible). Looking at the payload object, this doesn't seem possible.
There is nothing that stands out in the "PushNotificationManager" either. So has anyone manage to use JavaPNS and included custom properties in the payload ?
You should use one of the addCustomDictionary
methods for adding custom properties, after using the complex()
factory method to get an instance of the payload.
PushNotificationPayload payload = PushNotificationPayload.complex();
payload.addCustomDictionary ("stringParamKey", "stringValue");
payload.addCustomDictionary ("integerParamKey", 6);
payload.addCustomDictionary ("listParamKey", listOfValues);