I used sockets to connect two Android tablets as a network over wifi using the same router. one is a server and the other is a client.
the problems is that every time I want to connect the client and server tablets, I have to type in the server tablet’s IP address in the client tablet. Is there a way to avoid this?
I have not figured out how to send the server IP address to the client tablet before they are networked.
I wish there was a way to network the two tablets without having to know the IP address of the server tablet.
One idea is to have the server tablet connect to a website written in php and have the website get the IP address and store it in a database. next i would have the client tablet get the IP address from that website. Then the client tablet having the server’s IP will be abble to make the connection. All of this will avoid the user having to know the IP and typing it in every time they want to connect.
I am sure that others have done something like this before and solved this problem. Any ideas?
I had this kind of android app. What I did is by using a Multicasting network. See an example here
Since Multicast Network uses a group IP, here’s my suggested idea