문제

I am trying to make a simple android application, in order to make http requests between 2 android devices. The principle is the following:

The two android devices are running the same application. One device will make a http request to the other android device which will listen on a specified port, and the latter will respond to the first one with a response message like "OK", "Not received" etc. Basically, I have a form with name, firstname, address etc. and I want to send these with Http Request, and have a response to this request for acknowledging. I googled around for a couple of hours, all I could find were some examples with HttpRequest, but these were used when we want to make a HttpRequest to a website. Is there any way to do this?

올바른 솔루션이 없습니다

다른 팁

It's generally a very bad idea to have a http-server-like process on Android. I would recommend having an intermediate service (a normal web server) that can handle the requests or use Google Cloud Messaging to have the two devices communicate.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top