forked from github/cordova-android
Support all URIs by passing them to their default activity. This works for market:// and content://.
This commit is contained in:
parent
b6bd9ad5b8
commit
a7415bcfc9
@ -901,8 +901,8 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If http, https or file
|
// All else
|
||||||
else if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("file://") || url.startsWith("market://")) {
|
else {
|
||||||
|
|
||||||
int i = url.lastIndexOf('/');
|
int i = url.lastIndexOf('/');
|
||||||
String newBaseUrl = url;
|
String newBaseUrl = url;
|
||||||
@ -911,6 +911,8 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If our app or file:, then load into our webview
|
// If our app or file:, then load into our webview
|
||||||
|
// NOTE: This replaces our app with new URL. When BACK is pressed,
|
||||||
|
// our app is reloaded and restarted. All state is lost.
|
||||||
if (this.ctx.loadInWebView || url.startsWith("file://") || this.ctx.baseUrl.equals(newBaseUrl)) {
|
if (this.ctx.loadInWebView || url.startsWith("file://") || this.ctx.baseUrl.equals(newBaseUrl)) {
|
||||||
this.ctx.appView.loadUrl(url);
|
this.ctx.appView.loadUrl(url);
|
||||||
}
|
}
|
||||||
@ -927,8 +929,6 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user