Hi,
I tried to send a push notification message using the rest sender api as below {"message": { "alert": "test123", "user-data": { "somedata":"0", "somedata2":"1234" } }} if the application in the foreground I can read the "user-date" correctly under the payload object on the notification received call back, but if the application wasn't in the foreground the object doesn't contain the payload data ("user-date"). I make a quick review of the plugin code for Android and found that in this part NotificationMessageHandler.java -> line 77 (Message message = new Message(extras);) you are creating a new message object from the extras variable ;that have all the data; then in Message.java -> line 46 in the class constructor public Message(Bundle extras) { this(extras.getString("alert"), extras.getString("sound"), Integer.parseInt(extras.getString("badge")), extras.getString("aerogear-push-id"), extras.getBundle("userData")); } there is not "userData" field under extras, so this will result of ignoring all other payload data. Could you please check it |
Yes this is an error in the plugin, actually 2 errors it's not a bundle (it should be a string) and it's not called userData (but user-data). On Tue, Jan 19, 2016 at 12:21 PM, aamagdi <[hidden email]> wrote: Hi, Cheers, Erik Jan _______________________________________________ Aerogear-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/aerogear-users |
fixed the issue: pr: if you like you could try it out On Tue, Jan 19, 2016 at 6:25 PM, Erik Jan de Wit <[hidden email]> wrote:
Cheers, Erik Jan _______________________________________________ Aerogear-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/aerogear-users |
Free forum by Nabble | Edit this page |