使用webview android下载?

使用webview android下载?,android,android-webview,Android,Android Webview,android清单中是否设置了使用webview下载文件/文档的权限 我正在尝试使用webview显示一个按钮,单击该按钮时,应下载一个文件并将其保存在设备中 本许可证授予: `<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>` 您想要实现什么?试着使用一个标准按钮,在它的onclick上你必须自己下载文件 本模块就是答案: storeLocator.setDownloadList

android清单中是否设置了使用webview下载文件/文档的权限

我正在尝试使用webview显示一个按钮,单击该按钮时,应下载一个文件并将其保存在设备中

本许可证授予:

`<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>`

您想要实现什么?试着使用一个标准按钮,在它的onclick上你必须自己下载文件

本模块就是答案:

storeLocator.setDownloadListener(new DownloadListener() {
                public void onDownloadStart(String url, String userAgent,
                        String contentDisposition, String mimetype,
                        long contentLength) {
                  Intent i = new Intent(Intent.ACTION_VIEW);
                  i.setData(Uri.parse(url));
                  startActivity(i);
                }
            });

你能提供进一步的细节吗?你犯了什么错误?如果你确定这是权限问题(可能是android.permission.INTERNET?),Logcat通常会有相关信息@卡洛斯,我没有错。单击按钮时,不会执行任何操作!!已授予Internet权限。在这种情况下,发布一些代码可能会有用?:)@Carlos添加了该模块:)我正在尝试显示一个托管在其他服务器上的页面,单击该页面中的按钮时必须下载一个合同文档
storeLocator.setDownloadListener(new DownloadListener() {
                public void onDownloadStart(String url, String userAgent,
                        String contentDisposition, String mimetype,
                        long contentLength) {
                  Intent i = new Intent(Intent.ACTION_VIEW);
                  i.setData(Uri.parse(url));
                  startActivity(i);
                }
            });