title: Detect wifi IP address on Android?
body: <p>I need to determine if the Android device is connected to Wifi, and if so, obtain its Wifi IP address.</p>
  
  <p>I know how to use ConnectivityManager to determine whether the active network is a Wifi network, and I know how to use java.net.NetworkInterface to iterate over the available network interfaces and get their IP addresses.</p>
  
  <p>What I don't know how to do is determine which IP address belongs to the Wifi network, if there is more than one address found. Any advice?</p>
  
  <p>Thanks.</p>