How to open an URL from code in the built-in web browser rather than within my application?
I tried this:
try {
Intent myIntent = new Intent(Int
Try this:
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);
That works fine for me.
As for the missing "http://" I'd just do something like this:
if (!url.startsWith("http://") && !url.startsWith("https://"))
url = "http://" + url;
I would also probably pre-populate your EditText that the user is typing a URL in with "http://".