I want to make somethink like hyperlink. Right now, i created button, which opens new Activity with WebView. But i want to open a "globally" default web browser at specified url. How can i do this ?
+1
A:
Just make and Intent and set the link as uri to the intent. Then use the intent to start activity. Try this:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://stackoverflow.com")));
Konstantin Burov
2010-08-17 18:43:14
+3
A:
You can fire a global intent that will be picked up by the browser
Uri uri = Uri.parse( "http://www.google.com" );
startActivity( new Intent( Intent.ACTION_VIEW, uri ) );
Also make sure to add the web permission to your manifest
<uses-permission android:name="android.permission.INTERNET" />
sadboy
2010-08-17 18:46:07
Permission is not needed since its browser accesses the network, not the user app.
Konstantin Burov
2010-08-17 18:50:22
Ahh, good catch.
sadboy
2010-08-17 18:54:34