How can I get gateway and subnet mask details in Android?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have found a class called
DhcpInfowithin theandroid.netpackage. It has some public variables that stores the values of current Network parameters. But the problem is they return the value in integer converted from 8Bit shifted binary.Sample Image Describing thee Scenario:
****Here is a sample code:**
**java file:****
xml Coding:
I tried converting the integer value to its equivalent but i couldn’t. If you do so you can post back.. Bye..
UPDATE: Some how managed to convert the IP to v4 Format from the integer form
Conversion to IPv4 Format:
IMAGE Courtesy: http://www.bennadel.com/blog/1830-Converting-IP-Addresses-To-And-From-Integer-Values-With-ColdFusion.htm