How do two Android apps talk to each other?

What is the common communication architecture for the two Android apps?

Case 1:

I have two Android apps,

a) One of them is a server that is waiting for a client request, processes the request (reads data from some SQL server) and returns the results to the client. This server application runs on its own independent Android phone.

b) The second client, which sends the request to the server application in (a), and it also runs on its own independent Android phone.

The question is, should these two applications go through a mobile service provider to provide connectivity? or they can just talk to each other directly through some public IP / WIFi, etc. What is the communication structure / architecture for these applications?

Case 2:

I have an Android application running on an independent Android phone and I want him to talk to some server application (web server / application server) running on some machine somewhere on the Internet, send a request and got some feedback.

Again, do two applications need to go through a mobile service provider to facilitate communication? or do they just establish a direct TCP / IP connection through some public IP?

Any help articles really help.

thanks

Gough

+3
3

, ?

3G, . WiFi, . , Android , .

IP/WIFi ..

WiFi, WiFi-. WiFi, , Java (, NAT).

, ? TCP/IP IP?

Java. Java-. - Java. Java , : 3G, WiFi, ..

+3
+1
0

Source: https://habr.com/ru/post/1720966/


All Articles