android - 一个简单的图像搜索应用程序

标签 android android-searchmanager google-image-search web-search

我想开发一个简单的应用程序,它将


用关键字搜索图像
浏览图像
保存图像


如果我可以用Google做到这一点,那就更好了。

到目前为止,我在谷歌搜索后发现了这一点:

try {
    Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
    String term = editText.getText().toString();
    intent.putExtra(SearchManager.QUERY, term);
    startActivity(intent);
} catch (Exception ex) {

}




intent = new Intent(Intent.ACTION_VIEW, Uri.parse(
                    "http://images.google.com/search?
                     num=10&hl=en&site=&tbm=isch&source=hp‌​
                     &biw=1366&bih=667&q=cars&oq=cars& // here q='My_search_text'
                     gs_l=img.3..0l10.748.1058.0.1306.
                     4.4.0.0.0.0.165‌​.209.2j1.3.0...0.0
                     ...1ac.1.8RNsNEqlcZc"));
startActivity(intent);


我还没有完成编码部分。
现在的问题是,这是根据我想要的应用程序的正确方法吗?
主要是,任何教程对我都将有很大的帮助。

最佳答案

这是一些不错的示例代码,您可以从中获得帮助。


Android Image Search
Grid Image Search App Android


我希望这能解决您的问题。

关于android - 一个简单的图像搜索应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18350328/

相关文章:

android - Osmdroid map 旋转

python - 使用 Python 中的图像搜索 Google

java - 如何使用谷歌API保存谷歌图像中的图像?

android - 如何使用 Android 应用程序传送内容(图像)?

android - Scala Actor 线程控制

python - KivyMD ScrollView 示例

java - Android:将搜索 Activity 设为单顶

android - 从谷歌搜索应用隐藏搜索提供者?

android - SearchView getActionView 返回 null

iphone - 如何上传图片,然后在 iOS 中根据该图片执行自定义谷歌图片搜索?