How To Cache Multiple Urls For A Webview Activity From Recycler View Onclick
I have setup a WebViewActivity which gets the URL from the intent. I have setup an onClickListener for my Recyclerview which opens the WebViewActivity and loads the URL. However th
Solution 1:
You can write URL to the shared preference or file (with append mode), then whenever you need history just read the contents from the location
If you want cache web URLs then there is an option for WebView
Java code
webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
websettings.setAppCachePath(getContext().getCacheDir().toString());
websettings.setAppCacheEnabled(true);
websettings.setCacheMode(WebSettings.LOAD_DEFAULT);
Post a Comment for "How To Cache Multiple Urls For A Webview Activity From Recycler View Onclick"