title: Getting My LAN ip address (192.168.xxxx) (IPV4)
body: <p>In my android device I am trying to find its IP address(IPV4).<br>
    If I do the following code</p>
  
  <pre><code>InetAddress inet = InetAddress.getLocalHost();
  System.out.println(inet.getHostAddress()); //giving me 127.0.0.1
  </code></pre>
  
  <p>The code is giving me 127.0.0.1.<br>
  I wanted to get the actual IP 198.168.xx.xx.</p>
  
  <p>(In My pc the same code giving me the actual IP though.)</p>