如何使用Android Studio检测射击箱的变化?

发布于 2025-01-26 01:11:02 字数 221 浏览 4 评论 0原文

我的arduino-uno(此芯片与此问题无关)将两个值之一发送给 firebase 1或0 ,我想要它,以便每次值在数据库已更新中,它在Android Studio中被检测到,它检查了更新的值是否是

我特别需要的代码块,我只需要知道此部分的概念即可。我希望我的应用程序即使关闭了该应用程序,也可以检查该值,我确实在堆栈溢出上找到了一些东西。

My Arduino-Uno(this chip is not related to this question) sends either one of two values to firebase, 1 or 0, I want it so that every time the value in the database is updated, it gets detected in android studio and it checks if the value updated is one

I don't particularly require a block of code, I just need to know the concept of this part. I want my app to check for the value even if the app is closed, for which which I did find something on stack overflow.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静若繁花 2025-02-02 01:11:02

我希望我的应用程序检查该值,即使该应用程序已关闭

似乎并不难。您可以使用服务类,然后在此处执行事件侦听器任务。由于您没有要求任何代码,所以我不会分享。

这是一个很好的帖子

I want my app to check for the value even if the app is closed

That does not seem hard. You can use a Service class and then do the event listener task there. Since you haven't asked for any code, I won't share it.

This is a good post on it

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文