Android: Open URL in Android’s web browser from my application?

String url = "http://www.google.com";
Intent browserIntent =
new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
if (!url.startsWith("http://") && !url.startsWith("https://"))
url =