Thursday 10 January 2013

How To Open An URL In Android’s Web Browser

Here’s a code snippet to show you how to use “android.content.Intent” to open an specify URL in Android’s web browser.


	button.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {

Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://www.mkyong.com"));
startActivity(intent);

}

});



Note
For full example, please refer to this – Android button example.

3 comments:

  1. Great items from you, man. I have remember your stuff prior
    to and you're just too fantastic. I really like what you have acquired right here, certainly like what you're saying and the
    way in which in which you assert it. You make it entertaining and you continue to take care of to keep it wise.
    I can't wait to read far more from you. That is really a tremendous site.

    ReplyDelete
  2. Hello There. I found your blog using msn. This is a very
    well written article. I'll make sure to bookmark it and come back to read more of your useful info. Thanks for the post. I'll definitely return.

    ReplyDelete
  3. I am not sure where you're getting your info, but good topic. I needs to spend some time learning more or understanding more. Thanks for fantastic information I was looking for this information for my mission.

    ReplyDelete