Android手机与远程服务器通信的体系结构和协议 [英] Architecture and protocols for android mobile phone to communicate with the remote server

查看:379
本文介绍了Android手机与远程服务器通信的体系结构和协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


如何通过互联网建立基于Android的手机与远程服务器之间的通信?

哪种架构最好?
我应该使用什么协议?

目的是从服务器向手机发送和接收数据(文件)和通知.

Hi all,


how do i establish communication between android based cell phone and a remote server via internet?

which Architecture is best?
what Protocols should i use?

purpose is to send and receive data (files) and notification from server to the mobile phone

推荐答案

在服务层(客户端和服务器之间),最佳选择是REST服务,其消耗的数据少于基于XML的服务.

通常,TCP或UDP并非始终是最佳选择,因为网络连接在手机上并不可靠,并且可能在任何给定时间改变.
At service layer (between client and server), the best choice would be REST-Services, which consumes less data than XML based services.

In general, TCP or UDP are not always best choice, as network connection is unreliable on mobile phones, and may change at any given time.


这篇关于Android手机与远程服务器通信的体系结构和协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆