Tuesday, 10 September 2013

starting a particular webpate or url using intent in android

let see you wanna open some webpage or wanna work on some url you can do it by using intent


say you wanna open a www.google.com webpage when button is clicked or some activity is started

String url = "http://www.example.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);

No comments:

Post a Comment