User User - 1 year ago 97
Android Question

open a url on click of ok button in android

I have to open a URL on Click of

Button in a view. Can someone tell how to do this?

Answer Source

On Button click event write this:

Uri uri = Uri.parse(""); // missing 'http://' will cause crashed
Intent intent = new Intent(Intent.ACTION_VIEW, uri);

that open the your URL.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download