I need to get the netmask and ip from the Android so I can calculate all the IP's within my subnet range.
I've been searching and so far I've found this: Programmatically getting the gateway and subnet mask details
The problem is that it doesn't work for all devices. For instance, it doesn't work in the emulator (any Android version) and it doesn't work either in my Archos 7HT with Android 1.5. It returns 0 for netmask and gateway.
Is there any way to do it? Is there any system file which I could read that contains this info?? (something like this: http://www.flattermann.net/2011/02/android-howto-find-the-hardware-mac-address-of-a-remote-host/).
In my advanced wifi settings I can see these settings, so there must be a way to retrieve them...
Thanks.