fixed the issue:
https://issues.jboss.org/browse/AGCORDOVA-132

pr:
https://github.com/aerogear/aerogear-cordova-push/pull/90

if you like you could try it out

On Tue, Jan 19, 2016 at 6:25 PM, Erik Jan de Wit <edewit@redhat.com> wrote:
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 <aamagdi@ejada.com> wrote:
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



--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/Aerogear-Cordova-Push-Plugin-Android-Issue-tp441.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
Aerogear-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users



--
Cheers,
       Erik Jan



--
Cheers,
       Erik Jan