3 Replies Latest reply on Jun 11, 2015 12:37 PM by Jake Bernstein

    How to get network informations




      I would like to get the connexion informations of a device in the local network (local address IP, mask etc...). Is there a way to get it?


      I have tried these possibilities but none completly fit my needs :

      • addr_infos = Socket.ip_address_list

        This one work well but on android i have this error : "permission denied SIOCGIFCONF"

      • addr = UDPSocket.open {|s| s.connect("", 1); s.addr}
        With this one i am able to get the IP address but i would rather not request an external server (in case of devices only connected on a local network)


      I know there is also a way by using the Signal API but i woukd like to know if there is another possibility.


      Thanks in advance!