WebView's history and assoiciated canGoBack() and goBack() methods do not work properly when Google Chrome version 63.0.3239.111 is installed on the device. Uninstalling or disabling Google Chrome and its webview implementation solves the issue.
This issue ist tested and confirmed on Android versions 6.0.1, 7.1.2 and 8.1.0.
Issue description:
Saving the webview history does not work properly, when Chrome is installed. When you use webView.goBack() to navigate back to the page visited before, sometimes this page is skipped and the webView goes back to the first visited webpage. Other times the history is simply empty resulting in webView.canGoBack() returning false, although you had visited a page just before.
Workaround solution:
Uninstall chrome from device or disable it by using the System Developer Option 'WebView implementation'.
Google, please provide a Chrome update which solves this issue permanently. Our users are very confused by this inconsistent behavior. If this is not the right forum for developer topics, please advise in which forum or Google Group this issue should be posted and tracked.
Thank you very much in advance.