如何在Android中加载使用Google Chrome而非WebView的网页?

时间:2013-02-08 19:47:23

标签: android google-chrome android-webview

我想让用户点击按钮访问我的网站。

但是,我希望该应用打开Goog​​le Chrome或其他外部网络浏览器以打开网站,而不是使用WebView加载网址。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

您可以使用ACTION_VIEW Intent -

执行此操作
Uri myUri = Uri.parse("http://www.whereever.com/");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(myUri);
startActivity(intent);

如果您想通过点击按钮进行操作,则需要将其放在onClick的{​​{1}}方法中。