0

I know this is a duplication question and i have been doing a lot of research about this but still not able to find the answer.

I am developing a web page and open this url using Android WebView. So, I am trying to create a button to reload the URL. using :

location.reload(true)

But its not working. Is there anyone has solution ? Thanks

// Update

I am not able to edit the app that has the webView. Just using javascript.

// Update

Hmmm Its weird. Its working now without changing anything in my code. I just don't understand why.

daniel8x
  • 990
  • 4
  • 16
  • 34
  • Does this answer your question? [Is there a better way to refresh WebView?](https://stackoverflow.com/questions/2563325/is-there-a-better-way-to-refresh-webview) – jeprubio Dec 13 '19 at 20:19
  • @jeprubio I am not able to edit the webView. The WebView is coming from a 3rd party application. i am just using javascript and load it into the webview. If that make senses to you. – daniel8x Dec 13 '19 at 20:22
  • @daniel8x I think [this](https://stackoverflow.com/questions/34979010/reloading-a-webview-with-a-javascript-call-from-a-loaded-web-page) will help using javascript – Deleted Dec 13 '19 at 21:58
  • hmmm. It's weird. I have not change anything. and everything is working now. I dont know why ... – daniel8x Dec 13 '19 at 22:06

1 Answers1

0

Try the following:

myWebViewID.loadUrl("REPLACE_WITH_YOUR_URL");