Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Handle both data and notification payloads in the same GCM push #343

Closed
macdonst opened this issue Nov 17, 2015 · 1 comment
Closed

Handle both data and notification payloads in the same GCM push #343

macdonst opened this issue Nov 17, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@macdonst
Copy link
Member

When I push the following JSON:

{
      "data": {
            "title": "Hey there",
            "body": "This is the body of the notification",
            "key1": "message1",
            "key2": "message2"
        },
        "notification": {
            "title": "Hello, World",
            "icon": "ic_launcher",
            "body": "This is a notification that will be displayed ASAP."
        }
}

I end up with the following mangled data:

{
  "title": "Hey there",
  "message": "This is the body of the notification",
  "additionalData": {
    "key1": "message1",
    "key2": "message2",
    "notification": "Bundle[{e=1, body=This is a notification that will be displayed ASAP., icon=ic_launcher, title=Hello, World}]",
    "collapse_key": "io.cordova.hellocordova",
    "foreground": true
  }
}

if there is both a data and notification part the push plugin should handle both.

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant