Translate this page to

Search Android

Search For Android Tutorials (NEW, Custom Search for Android Developers)
Loading

Saturday, April 11, 2009

Open URL/Website from android

Here is a small piece of code to open a URL/Website from your application, place it on your class that has startActivity function, for example your class that extends Activity

String url = "http://almondmendoza.com/android-applications/";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);



Hope this helps.

Other android tutorial could be found at http://almondmendoza.com/android-tutorials/

3 comments:

Anonymous said...

Simple and effective!

AlexR said...

10x a lot!

Anonymous said...

Good solution. thx