---
title: "在WebView中调用拨号键"
author: "zcbbupt"
date: "2011-03-01T13:18:49Z"
tags: ["Blog", "HTML"]
categories: ["移动开发"]
slug: "webview"
draft: false
lastmod: "2011-03-01T13:18:49Z"
id: 935483
url: "https://zcbbupt.iteye.com/blog/935483"
---

原文：<http://blog.sina.com.cn/s/blog_6542586f0100laav.html>
	

```java
wv.setWebViewClient(new WebViewClient(){  
            public boolean shouldOverrideUrlLoading(WebView view,String url){  
                //当有新连接时，使用当前的 WebView  
                view.loadUrl(url);
                //调用拨号程序
                if (url.startsWith("mailto:") || url.startsWith("geo:") ||url.startsWith("tel:")) {
                  Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                   startActivity(intent);
                  }
                return true;  
            }  
        });
```