How do I set wifi ip address, dns address, gateway from android java i.e programmatically, I didn’t find any method which has the capability to store the values.
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.
You can change system settings programatically.
First you need to request the ‘WRITE_SETTINGS’ permission in your ‘AndroidManifest.xml’:
Then you need to actually change the setting using the following code:
The current settings can be accessed via the same method but use ‘getString’ instead of ‘putString’.
For information about the settings option visit the reference here:
Settings.System | Android Developers