From 2bb67ee4b0e49856ce4696bf020fbfe00af733ff Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 28 Oct 2010 23:18:28 +0800 Subject: [PATCH] Change use "geo:" instead of WebView.SCHEME_GEO The constant is "geo:0,0?q=", which means it doesn't match urls that specify the coordinates. The gmap app can handle these though, so we can pass any geo: url to it. --- framework/src/com/phonegap/DroidGap.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index d8c7a1ef..ffd257b3 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -487,7 +487,6 @@ public class DroidGap extends Activity { */ @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { - // If dialing phone (tel:5551212) if (url.startsWith(WebView.SCHEME_TEL)) { try { @@ -501,7 +500,7 @@ public class DroidGap extends Activity { } // If displaying map (geo:0,0?q=address) - else if (url.startsWith(WebView.SCHEME_GEO)) { + else if (url.startsWith("geo:")) { try { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url));