M
M
maxxx992018-08-30 22:05:22
Java
maxxx99, 2018-08-30 22:05:22

How to properly organize the download of files from some source in Android?

Hello! Maybe my question will seem completely stupid, but please understand me, because. hadn't dealt with this before. Suppose I have a set of pictures and xml files. I want to store them with the host and change them every month.
I have no idea how to extract these files (and upload them to the android application). Please tell me good sources on this topic or tell me how you would do it.
Also, I will not refuse advice on which normal hosting provider to choose for such needs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexeyID, 2018-08-31
@maxx99

Before asking questions, at least read at least one tutorial from beginning to end, for example here https://startandroid.ru/ru and of course the documentation on os android
1) The first thing you need to do is to implement an API (google) that will return a set of images in a form convenient for you, I recommend json
2)xml - in my opinion it would be more logical to replace it with json since it is more convenient to work with, but if not, then we use
XmlPullParser https://startandroid.ru/ru/uroki /vse-uroki-spiskom...
3) For http requests, I advise you to use one of the many libraries, for example okHttp or for example asynchronous http client, in my opinion, it is also a more or less normal library (by the way, Instagram seems to use this library, as it were)
4) For parsing json, you can use the GSON library
5) In order to display an image by reference in an ImageView, I advise you (in other ways, like Google docs) to use one of the libraries designed specifically for this, for example picasso square.github.io/picasso

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question