I have a Phonegap-related application that opens a PDF viewer at the click of a button. I did this with the FileOpener2 plugin.
When I return to the application from the PDF viewer, the result will differ depending on the versions of Android.
In Android 4. * the application remains where it should be before leaving the application. However, in Android 2.3.7, WebView reloads the application, which I do not expect.
I already tried changing android: launchmode to singleTask or singleInstance without success.
How can I avoid reloading the page when I return to the Phonegap application?
Thanks in advance!
Update 1
I changed the Cordova or Phonegap CordovaWebViewClient class, which extends WebViewClient with
@Override
public void onLoadResource(WebView view, String url) {
if (url.equals("file:///android_asset/www/index.html")) {
if (this.firstLoad) {
this.firstLoad = false;
} else {
view.stopLoading();
}
}
onLoadResource , .