拥有Android的WebView中检测并弹出对话框电子邮件或电话对话 [英] Having Android WebView detect and popup email dialog or phone call dialog
问题描述
在Android上,当内置的浏览器遇到一个电子邮件或电话号码,这是pressed,一个对话框出现,每个。
On the android, when the built in browser comes across an email or a phone number and it is pressed, a dialog box comes up for each.
不过,如果我浏览到我的应用程序的网页流量里面的那个网址,这不再是这种情况。
However, if i navigate to that url inside my Application's webview, this no longer is the case.
反正我的WebView呈现在检测电子邮件和电话号码,并弹出相应的对话框默认时pressed相同的属性浏览器应用程序?
Is there anyway for my webview to exhibit the same properties as the browser application in detecting emails and phone numbers and popping up the respective default dialogs when pressed?
我知道iPhone可以在界面生成器复选框做到这一点很容易,我希望在Android可以做同样的。
I know that the iPhone can do this with a checkbox in the Interface Builder very easily, I am hoping the android can do the same.
我已经进去一看这样的链接如下:
I have taken a look into such links as:
<一个href=\"http://stackoverflow.com/questions/1744091/is-there-any-way-to-have-webview-auto-link-urls-and-phone-numbers-in-android\">Is有没有办法让的WebView自动链接的网址和电话号码在Android的?
和使用中断链接点击但是,这并不真正帮助我,因为电话号码和电子邮件,不一定非得要链接的功能。
and using the function that interrupts the link click but that doesn't really help me because phone numbers and emails don't necessarily have to be linked.
推荐答案
我在寻找你有同样的问题。
I was searching for the same problem you were having.
如果你希望保持一个包含web视图中的网址,但有电话号码开始拨号器和电子邮件地址,启动电子邮件客户端,然后尝试。
If you are wanting to keep the URL contained within a webview but have the telephone number start the dialer and the email address start the email client then try this.
<一个href=\"http://stackoverflow.com/questions/4338305/android-webview-tel-links-show-web-page-not-found\">Android的WebView&QUOT;电话:&QUOT;链接显示的网页没有找到
底部的解决方案,为我工作。
The bottom solution worked for me.
这篇关于拥有Android的WebView中检测并弹出对话框电子邮件或电话对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!