在哪里可以找到 DownloadManager 的 ContentProvider 实现

发布于 2024-10-18 13:54:42 字数 582 浏览 5 评论 0 原文

我已经尽可能多地搜索了android的开源代码,但我还没有找到通过2.3 SDK中的DownloadManager进行实际下载的实现。我找到了 DownloadManager 的源代码下载类的源代码,该类具有与 ContentProvider 交互的常量,但我一直无法找到该源代码ContentProvider

我想找到这个,以便我可以知道实现我自己的下载的好方法,因为我将为我的应用程序使用低于 2.3 的版本。

I've searched through android's open source code as much as I could and I haven't been able to find the implementation to the actual downloading via the DownloadManager in the 2.3 SDK. I have found the source for the DownloadManager and the source for a download class that has constants to interact with the ContentProvider but I haven't been able to find the source for the ContentProvider.

I'm wanting to find this so that I can know a good way to implement a download of my own, since I'll be using a lesser version than 2.3 for my app.

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

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

发布评论

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

评论(1

冬天的雪花 2024-10-25 13:54:42

我能够找到这个 这里。您还可以通过克隆 DownloadProvider 项目并查看项目源来获取该项目代码。 DownloadProvider.java 正是我所寻找的。然而,DownloadThread.java 处理下载实现的核心,所以我建议查看它。

git命令是

git clone https://android.googlesource.com/platform/packages/providers/DownloadProvider

I was able to find this here. You can also get the project by cloning the DownloadProvider project and looking at the project source code. The DownloadProvider.java specifically was what I was looking for. However, the DownloadThread.java handles the heart of the download implementation, so I would recommend looking at that.

The git command is

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