Apologies for the general question, but it is an area I am having trouble even starting with. I'd like to write a basic android app for a smart phone that sends a simple string over HTTP to a web server.
The client side of this is fine, but I don't know where to start with the web server part - here are my questions:
On the server side, how do you capture the data received on the web server from the smart phone? Is there a recommended programming language or script where I can capture the string sent from the smart phone?
for such a simple task, do i still need a full web server, or is there a recommended lightweight one?
Is there a way of testing where I can send a string to the webserver, and a webpage can print out a list of strings it receives in real time? Would Ajax be appropriate for that?
Thanks a lot, any guidance much appreciated.
As @cybermonkey said, you should communicate via HTTP POST. Http Post lets you send data (large bits of data), you can use the headers actively to determine response status etc.
When using POST, I would recommend transporting the strings in JSON-format. JSON Allows you to serialize and deserialize objects, arrays and strings. Can be serialized and deserialized at both ends, so you can transmit data in both directions.
You need a language to receive the data from the mobile app. I'd recommend either the language ASP.NET or my personal favourite PHP. They are both decent web-programming languages.
In order to run these services you need a web-server. There are alot of web-servers out there. The most popular and easy to use is probably Apache / httpd. (Nginx can also be recommended - but is more difficult to work with).