背景服务运行像媒体应用一样继续

发布于 2025-02-07 09:02:16 字数 182 浏览 0 评论 0原文

如何在以下步骤中实施类似于“媒体应用”前景服务:

  1. 应用程序转到
  2. 从背景中杀死的背景应用程序
  3. 锁定的背景应用程序,或者手机已锁定到“空闲模式”

中,在上述三种情况下,媒体应用程序永远不会停止前景服务,没有任何电话活动。 我们在应用程序中需要相同的情况,该怎么做?

How to implement similar to "media app" foreground service for this following steps:

  1. App goes to background
  2. App killed from background
  3. The phone is locked or the phone has gone to "idle mode"

In the above three cases the media app never stops the foreground service, without any phone activity.
We need a same case in our app, how to do that?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文