当前位置: 动力学知识库 > 问答 > 编程问答 >

java - What to I need to do to on my server to communicate with an Android app?

问题描述:

I am currently writing and Android app, and I need to do some stuff with a server. Actually I just don't know where to begin, since I don't know very much about server side.

My Android app will send Java objects and images to my server, so what do I need to write or use on my server ? Is it possible to write Java code instead of PHP on the server side ?

Could you please give me the steps to prepare my server ?

网友答案:

Is it possible to write Java code instead of PHP on the server side ?

You can use any programming language you like for server side programming. This question provides some useful information on various Java based approaches using the HTTP protocol.

will send Java objects

You will need to serialise them to a data format. JSON and XML are popular for transmitting structured data across HTTP.

and images to my server

HTTP allows the transmission of files and Java can construct the request.

网友答案:

I see that you just want to communicate between the server and client(Android). I would recommend considering REST style web service for your server, where you can use either JSON (recommended) or XML format.

How to implement REST in a web-aplication?

分享给朋友:
您可能感兴趣的文章:
随机阅读: