I'm trying to create a URI from a URL for my Android application.
I've found the answer here How to create a Uri from a URL? but sadly, I am getting an exception
java.net.MalformedURLException
My code is
URL connection_url = new URL("http://www.google.com"); // exception on this line
URI uri = url.toURI();
I am importing the following
import java.net.URI;
import java.net.URL;
I'm not sure what I've done wrong
Edit
Updated from www.google.com to http://www.google.com - same error