亨德尔奇怪的应用程序流程 - Android

发布于 2025-01-08 06:12:50 字数 317 浏览 0 评论 0原文

我遇到了应用程序流程的奇怪问题。我正在创建音乐播放应用程序,它具有后台播放功能。我遇到的问题是,

  1. 在应用程序启动时,应用程序会加载 SD 卡中的所有歌曲。
  2. 用户开始播放歌曲。
  3. 现在他退出应用程序。
  4. 歌曲在后台仍在播放
  5. 现在,当他从通知栏或菜单再次启动应用程序时...所有歌曲都会开始再次加载现在这是我不想要的事情。

任何人都可以建议我如何处理这件事吗?

I got in to strange problem with the flow of application.I am creating music Playing application, which have capability of background playing. And the problem I am having is,

  1. on application starts application loads all the songs from SD card.
  2. User starts the playing of song.
  3. Now he exit form the application.
  4. songs is still playing in the background.
  5. Now when he starts application again either from Notification bar or from the menu... all songs starts loading again Now that is the thing I don't want.

can any one suggest me how to handle this thing ?

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

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

发布评论

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

评论(1

葬花如无物 2025-01-15 06:12:50

您的通知意图必须与启动器意图相同。

请参阅此答案:https://stackoverflow.com/a/5502950/377478

Your notification intent must be identical to the launcher intent.

See this answer: https://stackoverflow.com/a/5502950/377478

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