mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Issue #154: Propagate existing parameters when starting new DroidGap activity.
This commit is contained in:
parent
2bee9a8442
commit
53410781e4
@ -1118,8 +1118,19 @@ public class DroidGap extends PhonegapActivity {
|
||||
// our app is reloaded and restarted. All state is lost.
|
||||
if (this.ctx.loadInWebView || url.startsWith("file://") || url.indexOf(this.ctx.baseUrl) == 0) {
|
||||
try {
|
||||
// Init parameters to new DroidGap activity and propagate existing parameters
|
||||
HashMap<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("loadingDialog", "");
|
||||
if (this.ctx.loadInWebView) {
|
||||
params.put("loadInWebView", true);
|
||||
}
|
||||
params.put("keepRunning", this.ctx.keepRunning);
|
||||
params.put("loadUrlTimeoutValue", this.ctx.loadUrlTimeoutValue);
|
||||
String errorUrl = this.ctx.getStringProperty("errorUrl", null);
|
||||
if (errorUrl != null) {
|
||||
params.put("errorUrl", errorUrl);
|
||||
}
|
||||
|
||||
this.ctx.showWebPage(url, true, false, params);
|
||||
} catch (android.content.ActivityNotFoundException e) {
|
||||
System.out.println("Error loading url into DroidGap - "+url+":"+ e.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user