Android: open web page in a browser

To open a web page in an Android app, we need to create a new Intent and start a new Activity with it.

Here’s a Java method that we can re-use:

Just pass the URL of the web page you’d like to open to this method.

Source: How to open a website when a Button is clicked in Android application?

Catzie

A Filipino who is a mobile & web developer on weekdays, and a baker on weekends. When I have time to spare, I blog, play video games, watch series (usually anime), cook dishes, draw, or spend a little time with pets. When I have the rare luxury of time, I get to travel and record song covers too! Follow on Twitter: @catzie

Leave a Reply

Your email address will not be published. Required fields are marked *