我想知道如何使用 Google 图像搜索查询“按文本搜索图像”来启动浏览器。例如,用户可以选择某个词或短语并单击一个按钮,该 Activity 将使用 Google 图片搜索查询启动浏览器。
提前致谢。
最佳答案
像这样创建 URL:
String URLString = "https://www.google.com/search?hl=en&site=imghp&tbm=isch&source=hp&q="+TestString;
像这样启动它:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(URLString));
startActivity(i);
确保您的 TestString 是 URL 安全的
关于android - 如何在 android 中使用谷歌图像搜索查询启动浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14469372/