I'm creating an app that shows a web view. The web view uses a URL entered by a user. How can I have it so a user only needs to enter the url similar to how they would do it in a chrome browser?
For example
If I put facebook.com
in chrome it will load https://www.facebook.com
.
If I do webView.loadUrl("facebook.com");
it will fail. I would need to specify webView.loadUrl("https://www.facebook.com");
for it to work.
I want to avoid making my users first figure out if the page is http or https and if they need www.
or not.