I am developing a Cordova app having a Java backend. I want to know if it's mandatory to use GCM service in order to show a push notification in Android/iOS (in notification tray)?
I am using Apache Kafka, MQTT brokers in my backend. Is it possible to show push notification using these solutions, i.e. using completely self defined solutions?
Using MQTT & other brokers I am able to send realtime data to users but how to show those message as native notification in notification bar is my problem.
Yes, you will need to use GCM to send push notifications to Android devices. You can even use GCM to send push notifications to iOS devices (GCM makes request to APNS (Apple push notification service) to make it work).
But GCM for iOS isnt trusted much.
You can use any backend to send push notification to your devices. You just need to make a request to GCM/APNS.
This is the cordova plugin for push notification.
Integrating with GCM is damn easy, but it takes a little effort with APNS.
Most people use third party paid services like Pushwoosh to implement their push backend because its convenient. There is a free alternative OneSignal but it tracks your usage.
Follow this guide to setup push for APNS. (You can just use the Setup certificate part from this guide, since you are not using C#)
To receive push you need use/implement GCM(and actually FCM, because of GCM deprecation)
To show notification from app it is unnecessary to implement GCM/FCM
Related
I have a net core Back-End (3.1).
I created a page in which admin should enter title and description and pick a user to send a notification.
I want to send notification payload to Apple devices and not to an android device similar to a custom notification.
there is a platform-specific notification in Firebase Cloud Messaging documentation .
However, I was not able to implement it .
If you wanna only send the notification to Apple devices only. Then APNS Push notification push gateway will be suitable for you. See here
Certainly, FCM can also deal with this issue. You need to add the ApnsConfig to your request and send it to the FCM server.
If you cannot implement it, you need to mention more detail about your issue (trace log, exception info, etc.)
I am thinking one of the following technologies to use to build an Android Push Notification Server (not to use Google Cloud Messaging/GCM neither FCM):
Atmosphere Framework (http://async-io.org/)
Eclipse Mosquitto (https://mosquitto.org/)
The overall goal of this project is to allow Android application using the Custom Android Push Notification server be able to receive and display notification like this:
The first question would be: if an Android application does not utilize GCM or FCM would it be able to display notifications similar to those that use GCM or FCM?
Then if we use either the Atmosphere Framework or the Eclipse Mosquitto as a Push Notification Server would it be able to send push notification on an Android device without relying on GCM or FCM?
Also, I assume that if not using GCM or FCM then it is not possible for the registered Android device to receive a push notification from the custom APN server if the application that uses the custom APN is not running? This is correct, right? If so, then what would be the work-around? Make sure the Android application is running in the background?
I use FCM in my social messaging app. Sometimes FCM messages can not be delivered from the server to client.
Is there any benefit to using OneSignal when I've got to do the full FCM setup as well in server and client sides?
I reviewed OneSignal documents this link: https://documentation.onesignal.com/docs/product-overview
but I could not understand which was more useful.
I help work on OneSignal. Here are some reasons that OneSignal could be useful in this case.
OneSignal provides a single API and management interface for APNS (iOS notifications) and FCM (Android notifications).
OneSignal tracks notification click-rate for individual messages and campaigns.
OneSignal provides an SDK that takes care of reliably displaying messages that are received, restoring messages after an app update (on Android), and making it easy to customize notification categories, sounds, LED color, and Lockscreen visibility.
OneSignal stays up to date with any changes made to the operating system or notification APIs so you get access to the latest platform features without any additional engineering work.
FCM has two types of messages.Notification message which deliver in most cases, and data message which doesn't sometimes. A possible solution is to set priority of data message to HIGH while sending from server side.
https://firebase.google.com/docs/cloud-messaging/concept-options
What will an ideal android app notification server architecture. I am developing an android in ionic. It has a mqtt server that serve chat purpose.
What i want is when my app receive a new message it should show the message as native notification.
What I am confuse is as I already have mqtt server that can do real time messaging, do I really need to use google GCM for sending & receiving notification or I can serve my purpose with my existing configuration.
In my existing app I directly calling mqqt server from my android app for chatting purpose, so can it be same for notification also i.e. send a push notification directly from app just as a chat message.
Can anyone brief me about a push notification architecture implementation ?
Conceptually this should all work fine with just MQTT, no need for GCM.
The problem may be your use of cordova/ionic. It's been a long time since I looked at MQTT support in cordova, but to do push notifications properly you will need to run the MQTT client in a Android Service so it will stay running in the background and have it create notifications in response to received messages.
If the cordova MQTT support will not allow background services you will need to write your own extension.
I need to add the ability to send push notifications out to users who have our app installed (yet to go to market).
I guess I will need to install a phonegap plugin that will look for updates on our server (or could be triggered from our server) but I'm struggling to find a good approach.
I have seen this:
https://github.com/saileshmittal/phonegap-system-notification-plugin/tree/master/android-statusbar-notificaion
It allows phonegap to send a notification, but I don't know how I could send a remote message to the script to trigger a message.
C2DM is deprecated and GCM ( Google Cloud Messaging) is used to implement your push notifications for Android App.
In Android the technology of push notifications is called C2DM. Here is a tutorial for this.