views:

82

answers:

1

How can I code my Android application to start the web browser to display a given URL?

(I'd rather not embed a web browser component into my app, but rather want to start the Android web browser to show the URL.)

Thanks!

+10  A: 

Just use an Intent with the correct action and data:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.stackoverflow.com"));
startActivity(intent);
Daniel Lew
Perfect - thanks!
RichieHindle