node-gcm | NodeJS wrapper library port to send data | Messaging library
kandi X-RAY | node-gcm Summary
kandi X-RAY | node-gcm Summary
A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-gcm
node-gcm Key Features
node-gcm Examples and Code Snippets
Community Discussions
Trending Discussions on node-gcm
QUESTION
When I typed npm start following error is given ;
...ANSWER
Answered 2018-Apr-09 at 08:56Add a start script in the package.json file
QUESTION
I connect the database:
...ANSWER
Answered 2019-Apr-17 at 10:09Maybe have other solutions, but this is my solution.
Use
environment variable
to switch connection strings - variable name:DB_CONNECTION_STRING
Use Heroku platform-api to update
Config Vars
: UpdateDB_CONNECTION_STRING
value.
The first, edit your code to select the db string dynamically:
QUESTION
I'm sending notifications to an android device using node-gcm, and in some cases, I need to send an image with the notification to display as a thumbnail, like so: notification with thumbnail
And sometimes I need to send notifications without the thumbnail. With the below code I can send the image in the notification, the problem is when another notification is received, they collapse, making the new one overwriting a notification that was already there:
...ANSWER
Answered 2017-Mar-22 at 18:02The management of the display of notifications is done on the device. You have to make sure you are setting, on Android, a different NOTIFICATION_ID for each notification, or the last one will always replace the one before it.
QUESTION
I am trying to build PushNotification sever using node.js, I used "node-fcm" but it is not work with me, soIi tryed to use "node-gcm", but I faced same problem, I don't know how to send notifcation for all users? what I need to write in field (to:)??
this is my code:
...ANSWER
Answered 2017-May-30 at 13:18the problem resolved, in fact I didn't find solution to send notification to all user, so I used Topics in android app like this: in my ionic app I add topics option to android options like:
QUESTION
I am struggling to find the cause for the duplicate notification message on android using Firebase, Unity and sending from nodejs with the help of node-gcm.
Here is all relative code:
Unity3d client side I got:
...ANSWER
Answered 2017-Jan-18 at 15:17I am facing the same problem with firebase. I am using Firebase together with Microsoft Azure Notification Hub. If I send a test message via Microsoft Notification Hub I only get one message and that message is handled by my Push Handler. Otherwise if I send push notifications through firebase console I am getting two message like you(also one is empty). One message is handled by my push service and the second one is somehow handled by "no code"! I cannot find in my code where the push notification send by firebase is handled? There must be a OnReceiveMessage method in the background which handles the notification. For me I come with following solution: I just uncommented my push handler and now I am only getting one notification, but this without sound...somehow I have to override that function and implement sound behaviour. Have you found a solution for that? The empty message is caused by your push handler the second full message is handled in the background by firebase.
I also getting two different types of message in my onReceive() method:
Microsoft: Bundle[{google.sent_time=1484748187461, from=230XXXXXXXXXX, google.message_id=0:1484748187469719%8a1048bff9fd7ecd, message=Test through Microsoft, collapse_key=do_not_collapse}]
Firebase: Bundle[{google.c.a.udt=0, google.sent_time=1484748603664, gcm.notification.e=1, google.c.a.c_id=3001008833206773803, google.c.a.ts=1484748604, gcm.n.e=1, from=230XXXXXXXXXXX, google.message_id=0:1484748603943016%8a1048bf8a1048bf, gcm.notification.body=Test through firebase, google.c.a.e=1, collapse_key=com.sub_zero.ipostcard}]
So the message received through firebase is handled one time in the background somewhere maybe in through the firebase lib and the second time I suppose by your handler. That why you getting two of them...Just uncomment your push handler and test it again.
QUESTION
I am trying to send FCM with NodeJS using node-gcm module to my mobile client. I am not targeting a specific device. However, I want to send push by using a Topic, but when I call the FCM API, I receive the following:
...ANSWER
Answered 2017-Feb-08 at 22:38/topics/ was missing from this line:
var myTopic="phoneNumber_"+number;
solution :
var myTopic="/topics/phoneNumber_"+number;
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-gcm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page