Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 我可以从第三方应用程序查询下载管理器吗?_Android_Android Download Manager - Fatal编程技术网

Android 我可以从第三方应用程序查询下载管理器吗?

Android 我可以从第三方应用程序查询下载管理器吗?,android,android-download-manager,Android,Android Download Manager,我正在根手机上运行以下设置 应用程序A正在使用DownloadManager下载文件。应用程序B解析手机日志并捕获下载应用程序A发布的排队ID。 应用程序B能否查询DownloadManager并获取应用程序A下载的文件的状态 当我在应用程序B中使用以下代码和队列ID时,光标返回空 DownloadManager dm = (DownloadManager)getSystemService(Context.DOWNLOAD_SERVICE); DownloadManager.Query quer

我正在根手机上运行以下设置

应用程序A正在使用DownloadManager下载文件。应用程序B解析手机日志并捕获下载应用程序A发布的排队ID。 应用程序B能否查询DownloadManager并获取应用程序A下载的文件的状态

当我在应用程序B中使用以下代码和队列ID时,光标返回空

DownloadManager dm = (DownloadManager)getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Query query = new DownloadManager.Query();
query.setFilterById(enqueueId);
Cursor c = dm.query(query);
if (c != null) {
    if (c.moveToFirst()) {
    //returns false
    }
}