質問

I'm looking to program a network application. I was going through: http://www.stanford.edu/class/ee368/Android/Tutorial-3-Server-Client-Communication-for-Android.pdf which talk about server and client programming for android. Now imagine I don't have an internet connection and I want both server and client applications run on either same android device or different android devices locally.

Is it possible to develop and run both server and client applications using TCPIP/UDP/Multicast locally on either standalone android device or multiple android device?

役に立ちましたか?

解決

Yes, it is possible to communicate between Android devices or applications that are not connected to the Internet.

If you are using different devices, you probably want to use sockets, but it is possible to run an HTTP server on the server device and then use HTTP. Make sure they are connected to the same wifi network.

There are several different ways to communicate between different processes on the same Android device. The easiest might be to use a Messenger service but sockets and HTTP are also possible here.

他のヒント

Yes, it is possible in some manner.You can either use sqlite database present in android device to store various types of data in table form and data retreive from same.

Another way is to use Parse cloud as a server or backend of your client application.It allows your app to run even when you are not connected to internet.It stores the data in cache memory with its api and then uploads data to the server cloud as soon as you get connected to Intenet.

You can ask if you have any further queries. :)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top