Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何从应用程序在浏览器中打开链接?_Android_Webview - Fatal编程技术网

Android 如何从应用程序在浏览器中打开链接?

Android 如何从应用程序在浏览器中打开链接?,android,webview,Android,Webview,我正在开发一个android应用程序。当用户单击URL时,我正在使用WebView打开一个新活动。我想将其更改为在浏览器中加载URL。这怎么可能呢?就这样做吧 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")); startActivity(intent);

我正在开发一个android应用程序。当用户单击URL时,我正在使用WebView打开一个新活动。我想将其更改为在浏览器中加载URL。这怎么可能呢?

就这样做吧

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