mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
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:
parent
f7254044ee
commit
2bb67ee4b0
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user