简体   繁体   English

Web套接字和推送通知android

[英]Web socket and push notifications android

I have a web socket that I need to receive information from in my android app. 我有一个网络套接字,我需要从我的android应用程序中接收信息。 Would keeping a single web socket open at all times drain the battery on my android device? 是否始终保持打开一个Web插座会耗尽我的android设备上的电池电量? I expect that this web socket will only send notifications once every 24-hours, which is why I would like to close the connection, and somehow convert the web socket into a push notification. 我希望该Web套接字每24小时仅发送一次通知,这就是为什么我想关闭连接,并以某种方式将Web套接字转换为推送通知的原因。 But, then I also need to be able to send from the android app to subscribe to the web socket and receive push notifications. 但是,然后,我还需要能够从android应用发送以订阅Web套接字并接收推送通知。 How can I go about doing this? 我该怎么做呢?

I recommend using push notifications, which consume less battery of your phone and even more if you only send data once every 24 hours. 我建议您使用推送通知,这样可以减少手机电池的电量,如果每24小时仅发送一次数据,则消耗更多电量。

What technologies you plan to use? 您计划使用什么技术?

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

相关问题 带有2个按钮的Android推送通知用于渐进式Web应用程序? - Android push notifications with 2 buttons for Progressive Web Apps? 从 Web 服务器推送通知到 android 应用程序 - Push notifications from Web server to android application Android 上的 Microsoft Edge 中的 Web 推送通知不起作用 - Web push notifications in Microsoft Edge on Android not working 带有Web API的Android Push通知与SignalR通知延迟 - Android Push notifications with Web API delay with SignalR notifications PHP套接字服务器(用于Android推送通知) - 安全/身份验证问题 - PHP Socket Server (for Android Push Notifications) - Security / Authentication Issue PWA 的推送通知或 Web 推送通知 - Push notifications or Web push notifications for PWA 网络推送通知是否在 Apache Cordova Android 应用程序中工作? - Do Web Push Notifications work in an Apache Cordova Android app? Web应用程序中用于广播推送通知android的最佳后端技术 - Best backend technologies for Broadcast Push notifications android from web application 推送通知为Android - Push notifications for android android GCM推送通知 - android GCM push notifications
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM