how to open url in android

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

how to open url in android

Postby nbagade » Thu Jan 14, 2010 1:52 pm

Hi all,

I have one alert dialog ,in which i have two button (ok,cancel).

on click of cancel buttuon ,i want it should open the required url.

thanks in advance.

neo
nbagade
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Fri Nov 20, 2009 7:49 am
Location: India

Top

Postby jwei512 » Fri Jan 15, 2010 7:42 am

You want to open the browser with a certain URL?

Try this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
  3.  
  4. startActivity(intent);
  5.  
  6.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
- jwei

http://thinkandroid.wordpress.com
Examples, Code, and Tutorials
jwei512
Senior Developer
Senior Developer
 
Posts: 135
Joined: Mon Jul 27, 2009 9:35 pm
Location: Palo Alto, CA

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests