I have an activity that does OAuth authentication by intercepting the redirect url once it show up in the webview. However, the onPageFinished function is somehow called twi
Android for some reason calls onPageFinished() twice(and onPageStarted() three times!) when the loaded url is not a working one. The temporary solution is changing the redirect_uri to the url of a working website; in this case, I changed it to https://www.google.com/ (lol, sorry Google). onPageFinished is then only called once.
BUT- I do still want answers on why webview behaves differently when the loaded url is not a working one, and what is a better solution than changing the redirect_uri to google.com.