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.
15 comments:
Simple and effective!
10x a lot!
Good solution. thx
nice !
The code worked,interesting code, to open the url of a website from our application.
It cant be any better and neater than this !!!
Thanxxxx a bunch
Thank you very much!
Thank you very much.
Thanks, very quick & effective, saved me time & trouble!
it worked...thanks...
Thank you for sharing!
I would like to know if is it posible hide the address toolbar?
Thanks again
Good work.....
How can we get string from Edittext and then allow go to the link.
Tks very much for you share your knowledge... This code helped me a lot.. It worked perfectly..
Thanks.
friend, thank you very much for this code has helped me a lot .... but I have a big question ... with this code automatically opens my browser with the website we build but I need a few seconds after you close and return to me activity ... thank you very much in what they can help after the Star activity count 2 seconds and finish him and put me into the app ... thanks for your help! =)
Post a Comment