0

I am creating a live streaming application. There are 2 activities. Activity-A contains a button which direct to Webview-Activity-B (which has the webview). The live stream video (http://192.168.22.3:80/play) content is available when I go initially to Webview-Activity-B, but when I go back to Activity-A and then go to Webview-Activity-B It shows a blank white screen in the webview. Is this something I should work with OnResume/ onPause/ onSaveInstanceState/ onRestoreInstanceState.

  • I used this line of code webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); and It works fine. But the screen gets frozen after a while. (https://stackoverflow.com/questions/24789299/android-webview-save-state) – Laren Mark D'Cruz Nov 06 '20 at 16:36
  • https://stackoverflow.com/questions/34572748/how-to-make-android-webview-clear-cache Solved it – Laren Mark D'Cruz Nov 09 '20 at 14:02
  • It was crashing the web view again. so i added webViewCam.stopLoading(); webViewCam.loadUrl(" "); in onBackPressed() . Now it works successfully. – Laren Mark D'Cruz Nov 09 '20 at 15:49

0 Answers0