简体   繁体   中英

Is it mandatory to use GCM service to show push notification?

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, ie 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#)

要接收推送,您需要使用/实施GCM(实际上是FCM,因为GCM已弃用)要显示来自应用程序的通知,则无需实施GCM / FCM

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM