zeal4android
for Android developers
Monday, April 16, 2012
Android: Open browser with link example
You simply call a new Intent with URL link like following:
public
void
openBrowser(
final
String link) {
if
(link.contains(
"http"
)) {
Intent i =
new
Intent(Intent.
ACTION_VIEW
);
i.setData(Uri.
parse
(link));
startActivity(i);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment