Working with notification


#1

e been looking for the best way to work with notifications so far and used Pushwoosh but charge very expensive to use API for an application that has many users. and ionic seen working on their own notification system documentation but only shows the manual way for curl to send notifications, what is the best way to work with notifications? which system do you use?


#2

You can send a POST to Ionic push service to send notifications. It’s in the docs.


#3

I do not understand how to do write the curl from cmd but nothing comes to team


#4

Are you sure you understand curl and have everything setup correctly on your machine?


#5

This is the mistake that throws me

  Error: invalid json<br> &nbsp; &nbsp;at parse (/app/node_modules/body-parser/lib/types/json.js:79:15)<br> &nbsp; &nbsp;at /app/node_modules/body-parser/lib/read.js:102:18<br> &nbsp; &nbsp;at done (/app/node_modules/body-parser/node_modules/raw-body/index.js:248:14)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/app/node_modules/body-parser/node_modules/raw-body/index.js:294:7)<br> &nbsp; &nbsp;at IncomingMessage.g (events.js:199:16)<br> &nbsp; &nbsp;at IncomingMessage.emit (events.js:104:17)<br> &nbsp; &nbsp;at _stream_readable.js:908:16<br> &nbsp; &nbsp;at process._tickCallback (node.js:355:11)
    curl: (3) [globbing] unmatched close brace/bracket at pos 45

Also try a js file I saw there

 node ionic_push
STATUS: 202
HEADERS: {"server":"Cowboy","connection":"close","x-powered-by":"Express","access-control-allow-origin":"*","access-control-allow-headers":"Origin, X-Requested-With, Content-Type, Accept","content-type":"application/json; charset=utf-8","content-length":"67","etag":"W/\"43-f6ff5035\"","date":"Mon, 06 Jul 2015 14:49:46 GMT","via":"1.1 vegur"}
BODY: {"result":"queued","message_id":"3ec3e1dc23ee11e59a0c3216d2095bec"}

#6

go to the json.js file and see what the error is on line 79. Error says unmatched bracket so check that and see if it has typo. Then try it and see if the error is resolved.


#7

This file does not exist in the project. Insurance is generated by sending a request?


#8

Sorry friend I don’t know if I’ll be able to help you. I think we have a slight language barrier and some confusion as to what you are trying to do. I’m not an expert on using curl either, but from what I’ve read it doesn’t seem any more difficult than using a CLI.