gpt4 book ai didi

c# - 使用 Android 设备在谷歌浏览器中打开 URL

转载 作者:行者123 更新时间:2023-11-28 23:53:58 24 4
gpt4 key购买 nike

使用 Android 设备时,在谷歌浏览器中打开链接的正确 URL 语法是什么? “googlechrome://www...”似乎在 ios 上运行良好,但在 Android 上运行不佳。在android中使用此方法时,google chrome自动打开但停留在首页,不去链接重要编辑:我使用的是 C# 而不是 Java

最佳答案

要从您的应用打开网站,您必须执行以下操作:

String url = "https://www.example.com";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);

关于c# - 使用 Android 设备在谷歌浏览器中打开 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51628889/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com