The IP addresses will be whatever the DHCP server on that subnet says they should be. Often, the DHCP server role will be handled by your router to the internet, but in a corporate environment, things may be more complicated.
When a device connects to an IP network, it usually broadcasts "who am I?", and a DHCP server then tells it basic stuff like it's IP address. This can be a pre-allocated address assigned to that device, or it can be allocated dynamically from a pool of addresses. I would guess you don't want to require pre-assignment, because, typically, users would not be able to do so. So how do the devices discover each other's IP addresses? Well, there are a lot of options there. You can have each user type in the IP address. You can register the device dynamically under a DNS server, and have them type in the DNS name. You can use a service discovery protocol (like Apple's Bonjour service). You can roll your own using broadcast or multicast messages. You can register each device on a server -- and then even talk to each other THROUGH the server. This last has the great advantage that it allows two devices on incompatible networks to communicate. (I presume the disadvantages are obvious). About the only thing I can say for sure is -- you're going to need to know more about networking than you do today. It's learnable, and there are resources out there to help. Most of what you need to know is information that is not specific to the Android platform, so there will be a wide array of sources of information. Google searches are you friend. You can probably accomplish everything you're trying to do entirely with the classes in the java.net package. So you can develop your approach in any connected Java environment. On Jan 28, 1:56 am, Tony <[email protected]> wrote: > Hello ,all! > > If I connect two android pwer real-devices to a LAN through wifi, > then what are their IP adress??? > > How can then find each other by IP address??? > > are their IP address 192.168.0.* ?? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

