I need directions on how to start the android browser through code . Thanks !
Asked
Active
Viewed 2,016 times
2 Answers
7
If you want a fully blown browser try with :
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://Yoururl.com")));
Have a look to ACTION_VIEW Intent.
If you want to simply display some HTML try using WebView:
WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl("http://yoururl.org/");

systempuntoout
- 71,966
- 47
- 171
- 241
5
I'm not sure exactly what you mean. But from what I can see you'd either want a WebView or to be able to use an Intent to use the Browser itself.
Check out the documentation of Intent. There's also a blog post which gives you 4 ways of opening a web page in Android. I guess a commonly used method would be using Intent.ACTION_VIEW
Uri uri = Uri.parse( "http://stackoverflow.com" );
startActivity(new Intent(Intent.ACTION_VIEW, uri));
Here's a blog post explaining this

Damien MATHIEU
- 31,924
- 13
- 86
- 94

Lee Jarvis
- 16,031
- 4
- 38
- 40
-
@Damien MATHIEU Thank's for adding the anchor :) – Lee Jarvis Apr 15 '10 at 07:43