我想开发一个简单的应用程序,它将
用关键字搜索图像
浏览图像
保存图像
如果我可以用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/