Original Poster Posted March 17, 2013 Share Posted March 17, 2013 I need help with finding a snippet of code which would allow me to find the default gateway of the wifi connection :/ in a useable IPV4 address on an android device?? this is what i have so far... networkd = (WifiManager) getSystemService(Context.WIFI_SERVICE); details = networkd.getDhcpInfo(); gateway = "Default Gateway: "+String.valueOf(details.gateway);[/CODE] this just returns an string of numbers which is not a usable IPV4 Link to comment Share on other sites More sharing options...
0 Original Poster Posted March 28, 2013 Author Share Posted March 28, 2013 I need help with finding a snippet of code which would allow me to find the default gateway of the wifi connection :/ in a useable IPV4 address on an android device?? this is what i have so far... networkd = (WifiManager) getSystemService(Context.WIFI_SERVICE); details = networkd.getDhcpInfo(); gateway = "Default Gateway: "+String.valueOf(details.gateway);[/CODE] this just returns an string of numbers which is not a usable IPV4 just so everyones knows I found a solution :) Link to comment Share on other sites More sharing options...
0 Obi-Wan Kenobi Posted March 28, 2013 Share Posted March 28, 2013 O.o Link to comment Share on other sites More sharing options...
Question
Original Poster
I need help with finding a snippet of code which would allow me to find the default gateway of the wifi connection :/ in a useable IPV4 address on an android device??
this is what i have so far...
this just returns an string of numbers which is not a usable IPV4
Link to comment
Share on other sites
2 answers to this question
Recommended Posts