Disabling email,number detection in android WebView

柔情痞子 提交于 2020-01-01 19:58:11

问题


I'm developing an app with phonegap+sencha touch2+android. I've one panel showing various content that contains emails, some numbers in textual form. As it's a WebView when I tap on number, andorids default MailCompose Activity starts, when I tap on number Dialer Activity starts. How can I disable this from happening. Is there some config I'm missing from android side before loading url or web settings for WebView. Or something from Phonegap because when I saw log cat it shows following line -

DroidGap.startActivityForResult(intent,-1)


回答1:


You should be able to add the following to the <head> of your HTML document.

<head>
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
</head>

This should work on most WebKit browsers, such as Android, BlackBerry, and iOS.



来源:https://stackoverflow.com/questions/11798718/disabling-email-number-detection-in-android-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!