Take the 2-minute tour ×

I need to set IP adress on Android phone from my own application, any idea?

share|improve this question
add comment

3 Answers

you can set a ip for wifi but for mobile network

(Menu button) setting->wireless and network -> wifi setting ->(menu button again) -> advanced.

(Menu button) setting->wireless and network -> Mobile network -> Access Point Name -> and you can check if you can set a ip.

and btw, i think you can do (via software) with root access, otherwise it is not allowed.

share|improve this answer
This is not what he has asked for. He wants to set it by using his application which is not possible. –  Octavian Damiean Nov 18 '10 at 13:35
@ Octavian Damiean: why its not possible? Why they didn't give us access to set IP settings by our self, most of the people has to change thr IP settings as they move from one place to another (without DHCP). –  faheem Nov 19 '10 at 7:18
add comment

If you have busybox, installed, try opening a shell within your code and typing the following: busybox ifconfig eth0 IP_ADDR_YOU_WANT

share|improve this answer
or get into a rooted (su) local shell with ConnectBot and use ifconfig eth0 new_ip_addr –  HaoQi Li Jan 15 '12 at 22:36
add comment

If you are talking about the WiFi adapters IP address then no it is not possible and you certainly can't set a public IP address yourself since your providers network is not under your control and doesn't work as you might think it does.

You can only redirect the user to the wireless settings screen so he can set it himself.

share|improve this answer
eh?. Your wifi ip can be fixed (in your wi-fi menu in setting you must press the menu button and select the option advanced). –  magallanes Nov 18 '10 at 13:30
@magallanes: which is not what he is looking for. –  Octavian Damiean Nov 18 '10 at 13:38
Right, I didn't find any solution yet –  faheem Nov 19 '10 at 7:16
@faheem the problem is that there simply is none. You can only open up the settings screen for the user so he can set it himself. –  Octavian Damiean Nov 19 '10 at 8:55
add comment

Your Answer


