Android : Get the address of connected wifi hotspot device for socket request

on Friday, October 24, 2014


I want the address of wifi hotspot device (server) to send a socket request from another device (client). I tried WifiManager.getConnectionInfo().getIpAddress() in client device which is connected to hotspot but I get ConnectionException: Connection refused when I send the request.


How can I get the correct address? or if something else is wrong?


Any help is appreciated.


0 comments:

Post a Comment