This is used by PhoneGap / Cordova 2.7. Inside the external application, add a link pointing to "app: // index".
Inside onCreate add:
this.appView.setWebViewClient(new CordovaWebViewClient(this, this.appView) { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if(url.equalsIgnoreCase("app://index")) { Log.d("DEBUG", url); loadUrl(Config.getStartUrl()); return true; } else { return super.shouldOverrideUrlLoading(view, url); } } });
This will intercept the call and redirect the user to the configured start URL.
Dustin
source share