diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index dbc9f409..0826c50b 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -375,12 +375,7 @@ public class DroidGap extends PhonegapActivity { if (!url.startsWith("javascript:")) { LOG.d(TAG, "DroidGap.loadUrl(%s)", url); } - - // Init web view if not already done - if (this.appView == null) { - this.init(); - } - + this.url = url; if (this.baseUrl == null) { int i = url.lastIndexOf('/'); @@ -400,6 +395,11 @@ public class DroidGap extends PhonegapActivity { this.runOnUiThread(new Runnable() { public void run() { + // Init web view if not already done + if (me.appView == null) { + me.init(); + } + // Handle activity parameters me.handleActivityParameters(); @@ -520,6 +520,9 @@ public class DroidGap extends PhonegapActivity { // Handle activity parameters this.runOnUiThread(new Runnable() { public void run() { + if (me.appView == null) { + me.init(); + } me.handleActivityParameters(); } });