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.
This commit is contained in:
Matt Kane 2010-10-28 23:18:28 +08:00 committed by Bryce Curtis
parent f7254044ee
commit 2bb67ee4b0

View File

@ -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));