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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -