K
K
Kurban Mammaev2015-03-30 19:58:45
PHP
Kurban Mammaev, 2015-03-30 19:58:45

How to make a simple server that exchanges one variable with an Android application?

Hello. There is an application in java. I don't know much about servers. I know a little PHP. Please explain how to make the application, when the button is clicked, communicate with the server on my computer (if possible),
and update the variables in the program. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vitaly Pukhov, 2015-03-31
@Axe98

Since such a dance has already begun, you can simply put a text document and load it

I
IceJOKER, 2015-03-30
@IceJOKER

66aaa40539.jpg
When will you learn how to use the search ..
Android application sends a request to the server, php script or something else gives the answer.
script.php:

<?php
$var = "Something";
echo $var;

^^^
Here is a script that displays the value of a variable. It remains to download this page ( http://site.ru/script.php) via Android, all this is on the Internet

D
Dmitry Evgrafovich, 2015-03-30
@Tantacula

just put the json file on any hosting and request it from the application.

D
dchuvasov, 2015-04-01
@dchuvasov

If it is not critical that the data is on your computer, then it is better to use Parse.com for these purposes. This is a great backend option for mobile applications, and in general, when you don’t want to bother with the backend. There are other similar services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question