简体   繁体   English

发送android通知的最佳方式是什么

[英]What is the best way to send android notification

I am making an android app and I need to send notifications across devices.我正在制作一个 android 应用程序,我需要跨设备发送通知。 For example, A performs an action and B will be notified about the A's action.例如,A 执行一个操作,B 将收到有关 A 操作的通知。

I have also WebSocket with background services but the battery doesn't like..我也有带后台服务的 WebSocket,但电池不喜欢..

What is the best practice to do this?这样做的最佳做法是什么? And whats about firebase?那么firebase呢?

Thank you谢谢

The best practice is to use Push Notification.最佳实践是使用推送通知。 Firebase provides an excellent support to implement Push Notification. Firebase 为实现推送通知提供了出色的支持。 Please refer this for more information: https://firebase.google.com/docs/cloud-messaging/请参阅此了解更多信息: https : //firebase.google.com/docs/cloud-messaging/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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