I need to connect two android devices using wifi. One device is a server, which sends certain commands to second device. My question is how can I get IP address of the server from the client device? Using of some external wifi network is possible. Android.net.wifi.p2p is not acceptable for me, because it's only supported since API level 14.
UPDATE: is it possible to scan current wifi network to look for connected devices? F.e., in my case client scans its network, finds server and connects to it.
Try this.
Using this I am able to find DLNA devices on wifi network
Either you have a fixed IP on the Server or u can implement some kind of Broadcast every n-time, where only your device answers.
Maybe you can send a UDP Packet with some HELLO Request to all IPs in your Subnet and when the Server receives it he responses with an ACK Paket.
If you want to check if a Device is available on the network try to ping it and then try to connect.