0

I have a Webview which loads this page:

 WebSettings webSettings = mWebView.getSettings();
 webSettings.setJavaScriptEnabled(true);     
 mWebView.loadUrl("https://zkjellberg.github.io/dark-souls-3-cheat-sheet");

The problem is, every time I close the app and reopen it the checkmarks are gone, is there a way to preserve the state of checkmarks after the app is closed? I tried some things without success (like this, this, and this, both answers). Any help would be greatly appreciated!

Community
  • 1
  • 1
RingK
  • 83
  • 12
  • Honestly I have never worked with a webview very much, but I think what you want to do is killing the app and after starting it again call the last opened url. For that behavior the answers you suggested are not working because they are just saving states. So for your purpose you have to put your data somewhere else than the app itself (e.g database, preferences...) – David May 12 '16 at 12:06
  • What happens when you change the orientation of the phone ? Is the web page reloaded ? – Anukool May 12 '16 at 12:25
  • I forced it to Portrait mode, but yes, it is, and the checkmarks are gone as well. – RingK May 12 '16 at 12:27
  • Please refer this link , useful to you, http://stackoverflow.com/questions/10832462/save-webview-content-to-android-storage-and-load-it – Ganesh Krishnamoorthy May 13 '16 at 11:53
  • @GaneshKrishnamoorthy thanks! – RingK May 13 '16 at 18:06

0 Answers0