因为原生浏览器Browser3需要有SDCARD或虚拟分区才能进行下载
原因在于Browser3调用过了DownloadProvider,DownloadProvier不允许下载
private static Intent buildViewIntent(Context context, long id) {
final DownloadManager downManager = (DownloadManager) context.getSystemService(
Context.DOWNLOAD_SERVICE);
downManager.setAccessAllDownloads(true);
final Cursor cursor = downManager.query(new DownloadManager.Query().setFilterById(id));
try {
if (!cursor.moveToFirst()) {
return null;
}
final Uri localUri = getCursorUri(cursor, COLUMN_LOCAL_URI);
修改为
final Uri localUri = Uri.parse("file://"+file);
因为有些系统data权限目录很高,这样做就达到了所有文件都能进行下载了,而不需要新增sdcard