0
我试过电话:和短信:在WebView中。点击后,如果我得到URL包含电话:那么我打开电话的实用工具。然后我得到数字后跟字符'N'。 一个在短信:我越来越短信实用的手机,但没有号码。在这两个URL号码是存在的。未收到短信中的电话号码和电话号码中的正确号码
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
result = false;
// for telephone
if (url.contains("tel:")) {
view.getContext().startActivity(
new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
result = true;
}
// for SMS or message.
if (url.contains("sms:")) {
view.getContext().startActivity(
new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
result = true;
}
Log.d(TAG, url);
return result;
}