This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 441
send push notifications from app + small callback fix for push #286
Comments
something i noticed, on the onMessageReceivedCallBack function, message.foo throws an error unless to set message to any. Here is code that does not throw an error (very small change to yours) onMessageReceivedCallback: function (message: any) {
console.log("Title: " + message.title);
console.log("Body: " + message.body);
// if your server passed a custom property called 'foo', then do this:
console.log("Value of 'foo': " + message.foo);
} |
ButterMeWaffle
changed the title
send push notifications from app
send push notifications from app + small callback fix for push
Feb 16, 2017
Thanks, will take a look. Planning on releasing a new version today, so would be nice to add this as well. |
I've now added a |
EddyVerbruggen
pushed a commit
that referenced
this issue
Feb 17, 2017
I've opened an issue in the demo app repo to add an in-app push button. Not sure it belongs in the plugin, but it's a great addition to the demo app. |
EddyVerbruggen
added a commit
that referenced
this issue
Apr 18, 2017
EddyVerbruggen
added a commit
that referenced
this issue
Apr 18, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey Eddy,
Not an issue but I just managed to turn the curl into an http.request so we can send push notifications from the app itself. I thought it might be a good idea to add this code to the push section for others to use.
required --
var http = require("http");
the code
of course you would need to switch out the myFBKey and the usersPushKey for the proper keys.
(sorry is this is the wrong place to post this, also cant seem to fix the formatting of my code :( sorry) [EV: fixed, check the source to see how :)]
The text was updated successfully, but these errors were encountered: