android - 如何在 android 中使用谷歌图像搜索查询启动浏览器

标签 android google-search-api google-image-search

我想知道如何使用 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/

相关文章:

python-3.x - 如何优化我的 Python 反向图像搜索以限制到特定域?

google-search - 谷歌自定义搜索: get thumbnails in image search results

javascript - 向下滑动类似于谷歌图像结果

具有模拟位置提供程序的 Android 地理围栏

javascript - 将 body 背景设置为随机谷歌图像

java - Android Studio : Countdown timer which is also running when the app is closed

node.js - 用于 Node.js 的 Google 搜索 API 包装器

javascript - 将点击事件绑定(bind)到Google自定义搜索中的 'search'按钮

java - 如何在 Android Studio 中使用 Kotlin 编写/编辑 txt 文件?

android - 具有透明背景的对话框(任何颜色)