很好的 Android 服务示例应用程序

发布于 2024-09-12 07:24:00 字数 64 浏览 1 评论 0原文

是否有一个很好的示例应用程序或教程来创建在后台运行的 android Service

Is there a good sample application or tutorial for creating android Service that run in the background?

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

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

发布评论

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

评论(2

_畞蕅 2024-09-19 07:24:00

Android API 演示包括远程服务示例。我认为我们用它作为后台服务的起点。 Service 类的文档中还有示例代码。

The Android API Demos include a Remote Service sample. I think we used it as the starting point for our background service. There is also example code right in the documentation for the Service class.

水水月牙 2024-09-19 07:24:00

好吧,除了我自己的应用程序之外,我什么都不知道。但这是真实的应用程序,带有所有额外的代码,而不是示例。

如果您仍然想尝试一下,我建议您在 Calculator_Activity.java< /a> 以及 Calculator_Service.java。这应该会给你一些想法。

Well, I don't know any apart from my own application. But that is real applications with all the extra code that comes with it and not sample as such.

If you still want to have a go you I suggest you look for Service_Intend and Service_Connection in Calculator_Activity.java and for Calculator_Thread and Binder in Calculator_Service.java. That should give you some idea.

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