How to Open a webpage In BrowserHow to Open a webpage In Browser

How we can open a Web Page with Given URL in Android.

Answer 1

We can open a Web Page with Given URL in Android. To do this start an Activity passing the URL of the WebPage as data.

Make sure you declare following permission to access Internet
   

Use this code :
  
   Intent i = new Intent(Intent.ACTION_VIEW);
    i.setData(Uri.parse("http://www.cnn.com"));
    startActivity(i);
 

SUBMIT YOUR ANSWER

  |  
 
 
 

Preview :