DhcpInfo isn't responding the netmask in Android Lolipop -
DhcpInfo isn't responding the netmask in Android Lolipop -
yesterday update nexus 5 lollipop , application stops working, after little investigation found problem dhcpinfo isn't returning null on netmask variable.
i couldn't find alternative class.
any ideas?
regards
you can utilize getnetworkprefixlength
method of interfaceaddress
, networkinterface
. returns right value in lollipop.
networkinterface networkinterface = networkinterface.getbyinetaddress(ipaddress); (interfaceaddress address : networkinterface.getinterfaceaddresses()) { short netprefix = netaddress.getnetworkprefixlength()); }
note: returns network prefix length, you'd have convert (/24 255.255.255.0 etc.)
android android-5.0-lollipop netmask
Comments
Post a Comment