ragz
ragz

Reputation: 99

Getting IP addresses of the PC's available on wifi network in android

I am able to establish connection between android and PC via Wi-fi. But this is done by hard coding the the IP address of the PC (server) in the android program. But I wanted to get IP addresses of the PC's available on the Wi-fi network programmatically. So please let me know how to scan for PC's on the network and get their respective IP address.

Upvotes: 1

Views: 2508

Answers (1)

Sam Holder
Sam Holder

Reputation: 32964

can you not multicast a UDP packet on the network which the server listens for and responds to with a packet containing the ip address of the server in order to set up the connection?

You should be able to find help on that topic, with some options here here and here

Upvotes: 1

Related Questions