A simple image search app

时光怂恿深爱的人放手 提交于 2019-12-23 02:16:04

问题


I want to develop a simple application, that will

  1. Searches images with keyword
  2. Browses the images
  3. Saves the images

if i can do it with Google, it would be better.

so far i found this after Googling:

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

}

and

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);

i have not done the coding part yet. now the question is, is this a right way the application according to what i want? mainly, any tutorial would be a great help for me.


回答1:


Here are some nice Example Codes that you can take help from.

  1. Android Image Search
  2. Grid Image Search App Android

I hope this solves your problem.



来源:https://stackoverflow.com/questions/18350328/a-simple-image-search-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!