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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -