Quantcast

Trouble sending a push notification with criteria

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trouble sending a push notification with criteria

cmthomps
I'm using PostMan to test sending a push notification to an aerogear server hosted on open shift.  I can successfully send a push notification to all devices, but when I try to use an alias to send to only one device the message still gets sent to all.  Can someone help?  Thanks,  Craig

This is the contents of the posted message are:

{
  "message": {
    "alert": "Hello World"
  },
  "criteria": {
    "alias": ["E7AB13E3-9550-4646-8DB6-5A4971885A8A"]
  },
  "config": {
    "ttl": 3600
  }
}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble sending a push notification with criteria

cmthomps
Solved my own problem...  Not sure what version of AeroGear that is running on OpenShift but I was able to  watch the traffic going from the admin ui and figured out that it was not using the "criteria" section of the payload.  This worked.

{
  "alias": [
    "EF8AF3C7-32EA-4536-BD59-C8F9177BF14D"
  ],
  "message": {
    "alert": "This works!!!",
    "sound": "default"
  }
}
Loading...