---
title: "How can I open a URL in Android's web browser from my application?"  
description: "How can I open a URL in Android's web browser from my application?"  
author: "Anonymous User"  
published: 2015-06-08  
updated: 2015-06-08  
canonical: https://www.mindstick.com/forum/23286/how-can-i-open-a-url-in-android-s-web-browser-from-my-application  
category: "android"  
tags: ["android"]  
reading_time: 1 minute  

---

# How can I open a URL in Android's web browser from my application?

How can I get crash [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) ([stack](https://www.mindstick.com/blog/301746/why-is-stack-overflow-so-important-for-developers) traces at [least](https://yourviews.mindstick.com/story/1471/5-autobiographies-you-should-read-at-least-once)) from my [Android application](https://www.mindstick.com/forum/33405/how-to-get-the-build-version-number-of-your-android-application)? At least when working on my own [device](https://www.mindstick.com/blog/149/retriving-network-device-information-in-c-sharp) being retrieved by cable, but ideally from any [instance](https://www.mindstick.com/forum/155658/testing-connection-to-cloud-sql-instance-with-a-mysql-client-from-vm-instance) of my application running on the wild so that I can improve it and make it more solid.

## Replies

### Reply by Anonymous User

Try this:\

```
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));startActivity(browserIntent);
```

That works fine for me.\
As for the missing "http://" I'd just do something like this:

```
if (!url.startsWith("http://") && !url.startsWith("https://"))   url = "http://" + url;
```

I would also probably pre-populate your EditText that the user is typing a URL in with "http://".


---

Original Source: https://www.mindstick.com/forum/23286/how-can-i-open-a-url-in-android-s-web-browser-from-my-application

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
