F
F
freshcot2015-03-04 18:04:00
Java
freshcot, 2015-03-04 18:04:00

What is the best way to get data remotely?

Hello. There is a need to store some data remotely and receive it in the application when it is launched. I chose to receive them using JSON over http, but I just can't figure out how to do it. It's hard to google the lines you need.
As far as I understand, there is a file.json file, which lies somewhere where you can turn to, an http request is made to it from the application to get the data that it contains
. Are there any specific examples on this issue?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Cheremisin, 2015-03-04
@leahch

Well, why not, there is. There are a lot of options:
- put mongodb, elasticsearch or something similar on the server and work through REST.
- write your own REST server, it is easy to write in any language, from Java to bash.
- well, just learn this simple REST technology habrahabr.ru/post/38730

V
Vladimir Smirnov, 2015-03-05
@bobzer

If you chose HTTP, then you will need a web server in order to "raise" this protocol on the server, and on the web server you will also need to deploy the REST service engine and directly your web service, which will read the file and return it content. Usually, this approach is used for more complex tasks than just downloading a static file. If the whole point of the task is to download a file from a server, then you don't need a web server, JSON, or HTTP; use any file format that is readable by your software, and take the file, for example, via FTP...

X
xne71247, 2015-03-04
@xne71247

Perhaps the book " Reto Mayer Android 2. Programming Applications for Tablets and Smartphones " will help you, it has an example of how to get data remotely, described in chapter 5 , topic Creating an Earthquake Viewer Application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question