连接到Firebase的服务不好主意? [英] Service connecting to Firebase a bad idea?
问题描述
我错过了其他建议或可能的问题吗?感谢您的时间!
编辑
我发现 this thread 。仍然不确定。也许一个服务不是一个坏主意,根据詹姆斯坦普林(嫌疑人他是Firebase的开发人员)解决方案
您可能想要使用GCM在这种情况下。
Firebase可以在后台服务中正常工作,但是会打开一个套接字,所以会使用相当多的功能。当用户积极地使用你的应用程序(这个屏幕可能使用了更多)时,这个用电量是很好的,但是当它在后台运行时,电池寿命将会很难。在大多数情况下,当用户没有主动参与时,他们愿意接受较慢的响应时间,像GCM这样的推送服务是一个更好的价值,单位为瓦特/瓦特用户的快乐。
此外,Firebase正在努力添加触发器,如,这将使未来与GCM等推送服务整合变得更容易。 我想你可以说詹姆斯是一名Firebase开发人员。他是联合创始人之一:) I am building an Android app that requires real time updates. My server is Firebase. Firebase is meant to receive its updated data when the user is connected to the server. I am very impressed with Firebase so far, however my concern is receiving the new data when the app is not active. I really do not want to try these ideas to find out they are a bad idea, for I am short on time. I am looking for suggestions and advice. Any other suggestions or possible issues I missed? Thanks for your time! I found this thread. Still unsure. Maybe a service is not a bad idea, per James Tamplin (Suspect he is Firebase dev) You probably want to use GCM in these situations. Firebase works fine from a background service, but it leaves a socket open, so it's going to use quite a bit of power. This power usage is fine when a user is actively engaged with your app (the screen probably uses a lot more), but when it's running in the background, it's going to be hard on battery life. In most cases, when your user isn't actively engaged, they're willing to accept slower response times, and push services like GCM are a better value in watts per user happiness. Also, Firebase is working on adding triggers, as demonstrated in this video from Google Cloud Platform Live, that will make it a lot easier to integrate with push services like GCM in the future. And I guess you could say James is a Firebase dev. He's one of the co-founders :) 这篇关于连接到Firebase的服务不好主意?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
Edit