mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-13 19:43:06 +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
|
@Override
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
|
|
||||||
// If dialing phone (tel:5551212)
|
// If dialing phone (tel:5551212)
|
||||||
if (url.startsWith(WebView.SCHEME_TEL)) {
|
if (url.startsWith(WebView.SCHEME_TEL)) {
|
||||||
try {
|
try {
|
||||||
@ -501,7 +500,7 @@ public class DroidGap extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If displaying map (geo:0,0?q=address)
|
// If displaying map (geo:0,0?q=address)
|
||||||
else if (url.startsWith(WebView.SCHEME_GEO)) {
|
else if (url.startsWith("geo:")) {
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setData(Uri.parse(url));
|
intent.setData(Uri.parse(url));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user