WebView mWebView =(WebView) findViewById(R.id.webView);
mWebView.setDownloadListener(new DownloadListener() {            public void onDownloadStart(String url, String userAgent, String contentDisposition,
                    String mimetype, long contentLength) {
                if (contentDisposition == null
                        || !contentDisposition.regionMatches(true, 0, "attachment", 0, 10)) {
                    Intent intent = new Intent(Intent.ACTION_VIEW);
                    intent.setDataAndType(Uri.parse(url), mimetype);
                    ResolveInfo info = getPackageManager().resolveActivity(intent,
                            PackageManager.MATCH_DEFAULT_ONLY);                    if (info != null) {
                        ComponentName myName = getComponentName();
                        if (!myName.getPackageName().equals(info.activityInfo.packageName)
                                || !myName.getClassName().equals(info.activityInfo.name)) {
                           
                            try {
                               //使用ANDROID内置播放器
                                startActivity(intent);
                                return;
                            } catch (ActivityNotFoundException ex) {
                            }
                        }
                    } else {
                        //下载开始
                       //自定义下载
                    }                }
            }        });