开发者

Natural webservice type for Android [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

We want to track GPS data on Android and send it to server, ther开发者_如何学编程e will be also another two-way communication.

Question: What is the most natural/easy-to-implement type of webservice on the server side to which can Android connect? We would like to use classic .NET WCF Web services, is it a good choice or something like XML-RPC would be better?


The easiest to implement would be REST Based API that returns JSON data (whichever platform you choose).

Part of the reasons :

  • Built in HttpClient in Android for REST Operation such as GET AND POST.
  • Easier to construct the input through URL for GET or even POST compared to SOAP or XML message construction
  • JSON library is built in as part of Android, making it easy to work with JSON result. Walking JSON key-value pair is easier than walking through XML Structure
  • As a mobile app, it needs a compact data to be transferred through a network and JSON is lighter than XML RPC
  • As an additional plus outside Android, the REST API with JSON is also easier to integrate with the web counterpart, so you will have API for multi channels delivery
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜