How to send a push notification

不羁岁月 提交于 2020-01-14 19:16:17

问题


What is a service that i can use to send a notification to an Android device? I want it so i can send it in real time!


回答1:


You have to use GCM - Google cloud messaging for sending push notifications to Device.

Refer to demo application given in android developer site.

GCM Demo Application

And main link is - Google Cloud Messaging for Android




回答2:


I think the best way to send notifications in Android is FCM(Firebase cloud message ), and this service is also from google which is a replacement for GCM.Use the below link for more information.

https://firebase.google.com




回答3:


In my opinion Firebase cloud messaging is the best option. Because FCM has several advantages over GCM.

Firebase Cloud Platform inherits GCM's core infrastructure but simplifies the client development.

In FCM you do not need to write your own registration or subscription retry logic. Now, you can integrate FCM in your app with just a few lines of code.

However, GCM is not deprecated: Google will continue to support it but all new client-side features will be available on FCM SDK only. The protocol remains the same server-side though.

Update (30 - July - 2018): As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019. See this migration guide to learn more.

Thanks @eis for your comment to update this post.




回答4:


I think Google Cloud Messaging for Android is the way to go.



来源:https://stackoverflow.com/questions/15385168/how-to-send-a-push-notification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!