Ionic.io send push notification from node js server - android

I have successfully coded my ionic app to receive and display push notification from Ionic.io. I am deploying on a real Android device.
For this I am sending notifications from the web dashboard.
Now I want to move this mechanism to my node js server to send the push notifications from there to my ionic app. I am following the guidelines mentioned on ionic io's website but it is not working.
I have been struggling with this for hours and couldn't know what the blocking is, I am not sure if the POST parameters on the site are outdated or there is a specific way of achieving that.
What is the right way to send those notifications from a node js server?

I ended up using node-gcm for this task.
To implement it I followed the tutorials tutorial-1 and tutorial-2.
Update 2016
I forgot to mention that the following Youtube tutorial was extremely helpful too on the angular's side of ionic.

Related

Android WebView app with notifications

I am making WebView app for a news website. I need help with setting notifications.
Steps that I have already done:
Set webView app.
Configure for firebase.
Defined basic MyMessageService and MyMessageIdService.
Tested push notification that I sent from Firebase to a device.
My question is: how to set my app to receive notification when new news is posted, or when a comment is made on liked news?
Thanks!
To send notifications on demand you have to do some things first:
collect the firebase tokens of all the devices that are using your
app.
save all these tokens against users or profiles
develop custom app server that will help you to send the
notifications on devices using these firebase tokens.
to develop your app server you can use the code from androidhive.
link to code of app server
for any further query you can ask in comment.
hope this help you.

Laravel 5.2 with GCM push notification

I am trying to build a chat application.
I am using laravel 5 as back end and android device as my front end.
I am following this tutorial. They are using slim framework, But I am using laravel 5. I need to include GCM(Google Push Notification) into laravel so I am using this package click here. But they have give a variable deviceToken. I don't know how they are generating and sending push notification.
Any help would be appreciated. Thank you.
The device token is generated with JavaScript. You have to ask the client in the browser if he/she allows you to send him/her notifications. If he/she clicks yes, a device token is generated. You have to send it via ajax to laravel and store it in the database. Then you can use it to send your notifications.
I would suggest you fcm instead of gcm. Both are from google, but the one from firebase seems to be the future one.
You can find a package here: https://github.com/brozot/Laravel-FCM

gcm push notifications, progressive webapp

I followed the google documents to create a progressive webapp and I've just implemented push notifications, however whenever I close the app I don't get any notifications.
Other apps like whatsapp seem to be able to send those notifications is there a difference between native notifications and gcm push notifications from a progressive webapp?
There absolutely no difference between the two, the rendering part is the same, it just that native ones are the notifications that comes from a apk generated app and the other one is rendered using google chrome or any web browser that support the functionality.
Beside the service worker with the help of manifest.json file will use the GCM ( Google Cloud Messaging) to send notifications to end users.
I worked and implemented such functionalities before, and I got my notification directly to the browser and my android phone as well, therefore I created a Github repo with nice documentation that simulate just that using Nodejs and simple web interface, please feel free to check I guess it holds what you seek :
Link : https://github.com/houssem-yahiaoui/webpush-notification

Mobile Push Notification using Web App

1- I want to write a simple web app (not native) used to send my clients news via push notification on ios, android, etc.
I found pusher.com, but the demo is not working.
It could be great if I can link it to my rss url, so they can get notified whenever a new record is added.
2- I want to add shortcut of my app on client devices.
Thanks
You can use GCM for android, and APNS for iOS, and there are many tutorials of these. Especially, iOS very strict rule for push notification, or your app will be rejected.

Push Notifications using Rails server

I have a rails server and a backend. Is it possible to send a push message using my rails server to both iPhone and android app?
Yes, it is possible. Here are gems that I used recently in my projects: Android push service and Apple push service
They are well documented so you should not face big troubles about setup.
I created a gem in order to create a central push notifications, it supports iOS and Android at the moment, but i will add more platforms.
Maybe this will help you
here is the link: https://github.com/NicosKaralis/pushmeup
Try using grocer gem for ios push notifications. Thats pretty easy to setup and get going.

Categories

Resources