forked from github/cordova-android
CB-2446: Ugly, but workable fix
This commit is contained in:
parent
8613551aec
commit
c20b2330ab
@ -23,6 +23,7 @@ import java.util.StringTokenizer;
|
|||||||
|
|
||||||
import org.apache.cordova.api.CallbackContext;
|
import org.apache.cordova.api.CallbackContext;
|
||||||
import org.apache.cordova.api.CordovaPlugin;
|
import org.apache.cordova.api.CordovaPlugin;
|
||||||
|
import org.apache.cordova.api.LOG;
|
||||||
import org.apache.cordova.api.PluginResult;
|
import org.apache.cordova.api.PluginResult;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
@ -108,6 +109,17 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
|| Config.isUrlWhiteListed(url)) {
|
|| Config.isUrlWhiteListed(url)) {
|
||||||
this.webView.loadUrl(url);
|
this.webView.loadUrl(url);
|
||||||
}
|
}
|
||||||
|
//Load the dialer
|
||||||
|
else if (url.startsWith(WebView.SCHEME_TEL))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||||
|
intent.setData(Uri.parse(url));
|
||||||
|
this.cordova.getActivity().startActivity(intent);
|
||||||
|
} catch (android.content.ActivityNotFoundException e) {
|
||||||
|
LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
// load in InAppBrowser
|
// load in InAppBrowser
|
||||||
else {
|
else {
|
||||||
result = this.showWebPage(url, features);
|
result = this.showWebPage(url, features);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user