This is an old revision of the document!
inAppBrowser
backbutton
With these modifications the hardware back button works within pages in an InAppBrowser.
In src/com/org/apache/corodova/inappbrowser/InAppBrowser.java change
private void goBack() { if (this.inAppWebView.canGoBack()) { this.inAppWebView.goBack(); } }
to (note public method)
public void goBack() { if (this.inAppWebView.canGoBack()) { this.inAppWebView.goBack(); } } public boolean canGoBack() { return this.inAppWebView.canGoBack(); }
src/com/org/apache/corodova/inappbrowser/InAppBrowserDialog.java change
public void onBackPressed () { if (this.inAppBrowser == null) { this.dismiss(); } else { // better to go through the in inAppBrowser // because it does a clean up this.inAppBrowser.closeDialog(); } }
to
public void onBackPressed () { if (this.inAppBrowser == null) { this.dismiss(); } else { if (this.inAppBrowser.canGoBack()) { this.inAppBrowser.goBack(); } else { this.inAppBrowser.closeDialog(); } } }
autoplay
Enable video autplay without gestures
In file src/com/org/apache/corodova/inappbrowser/InAppBrowser.java add (~647 row)
inAppWebView.loadUrl(url); inAppWebView.setId(6); inAppWebView.getSettings().setLoadWithOverviewMode(true); inAppWebView.getSettings().setUseWideViewPort(true); + inAppWebView.getSettings().setMediaPlaybackRequiresUserGesture(false);