I need from my Android application to access the site with pictures and place these pictures in my application. Advise how to build the work properly, because I absolutely do not know how to implement it. A friend says, you need to write a parser in php and upload it to the hosting, when accessing which from my android application, you will get pictures from the site. But I do not like this method.

Do you have any suggestions for the application receiving pictures from the site? And how can they be placed in the application? Using ListView or are there other options?

  • 2
    Parsing through the site is good. If they change html there, you will only need to update your site. But if you parse on the client, you can look at jsoup. - KoVadim

1 answer 1

  1. The php script will allow the application to only display images without the need to extract them from the site. In addition, do not need to update the application when changing the source of images.
    On the other hand, you will depend on the host, write a part of the code in another language, and take care of the possible high load on the server.

  2. If you pick out the pictures with the application - then your option is jsoup and no fuss with php, server, hoster and loads on it.

  3. ListView is deprecated. Use RecyclerView - it is able out of the box to display both vertically and horizontally, as well as with a grid.

  4. Having received links to pictures load / display them specials. either. UIL or Picasso

  • If you use jsoup, will it check for changes to the pictures on the site? That is, if a part of the pictures on the site are removed, will the changes appear in the application? - Crok
  • @Crok, it all depends on how you write the code. In general, jsoup receives the HTML code of the page as input and pulls out links to the images from there. That which is not, he can not pull out. Those. Yes - deleted images will never appear magically anywhere. If you do not save them in your application. - Yuriy SPb
  • one
    Thank you so much, Yuri !!! - Crok