---
title: "浏览器中打开指定的链接"
author: "lynen"
date: "2014-09-05T18:21:54Z"
tags: []
categories: ["移动开发"]
slug: "untitled"
draft: false
lastmod: "2014-09-05T18:21:54Z"
id: 2113810
url: "https://lynen.iteye.com/blog/2113810"
---

浏览器中打开指定的链接

```
try {
            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setData(Uri.parse(mCurrentUrl));
            this.startActivity(intent);
        } catch (ActivityNotFoundException e) {
            //需要增加此异常处理的原因是：手机上可能没有安装浏览器
        }
```