`
jiaoronggui
  • 浏览: 1344901 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
博客专栏
B7c2eb31-a8ea-3973-a517-d00141f39b89
项目管理软件-redmin...
浏览量:117063
4a63e153-250f-30f6-a051-97cfc67cb3d3
IT职业规划
浏览量:200440
社区版块
存档分类
最新评论

android webview增加下载附件功能

 
阅读更多
 webView.setDownloadListener(new DownloadListener() {

            public void onDownloadStart(String url, String userAgent,
                    String contentDisposition, String mimetype,
                    long contentLength) {
                // handle download, here we use brower to download, also you can try other approach.
                Uri uri = Uri.parse(url);
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);
            }
        });

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics