I have an app with a WebView. There is a page with Upload Photo button so I use the openFileChooser. Sometimes I have a problem when the camera is chosen. The activity restarts and the webview is back on the beginning. How I can save the state of the activity? Please give an example (I saw that a good example of this would be useful).
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can save the Webview in Android Cache : Use WebView Setting :
webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
This will help you ..happy codeing