问题描述
我正在使用以下代码
DownloadManager downloadManager = (DownloadManager) context.getSystemService(DOWNLOAD_SERVICE);
Uri downloadUri = Uri.parse(post.vUrl);
DownloadManager.Request request = new DownloadManager.Request(downloadUri);
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_MOVIES,"My_APP."+post.date);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setVisibleInDownloadsUi(true);
request.setMimeType("video/mp4");
downloadManager.enqueue(request);
不管有没有我都试过了
request.setMimeType("video/mp4");
它会下载视频,如果我在菜单中(在下载箭头上)按下它,它就可以正常播放。但是,如果我关闭它并尝试在我的下载文件夹中访问它,我的手机会告诉我它无法打开此类文件。
我不明白为什么。当我点击下载时它有效,但稍后不可用? 有什么解决办法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)