Answer the question
In order to leave comments, you need to log in
Is it possible to write a client-server for a smartphone?
Is it possible to write a smartphone application that is both a client and a server?
The application must work on 2 arbitrary smartphones that are connected to 3G or wifi.
Those. so that you can take 2 smartphones and transfer data between them without a connecting server.
At the same time, ip addresses are known and registered at the time the application is launched.
It's just not clear, but what if the ip is dynamic or this one doesn't matter?
And what could be the limitations of such an application?
Answer the question
In order to leave comments, you need to log in
And what could be the limitations of such an application?
Of course it's possible. There are such applications https://play.google.com/store/apps/details?id=com.... Within the line of sight, you do not need a third-party network at all - wifi spot can be set up on the device. If you wish via intra/internet, then servis_disvovery and name_resolving are performed by means of the provider google/apple/MTS etc. Servers on android are raised, as on any linux, personally verified.
Of course you can. I don't see any problem. Unless it will work either only within one local network (for example, sitting at home with a guest / neighbor on the same WiFi or, say, on a train, setting up your smart as a shootout point - by the way, it should be very convenient for multiplayer toys without the Internet, I would like it to be more such) or in the conditions of port forwarding prescribed on the router.
PS: I recommend that you immediately embed in your application the display of your own IP, which you need to inform the client, otherwise I personally, for example, did not find a standard function (in the sense not in the SDK, but in the Android UI itself) or at least one convenient application that does this .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question