Reputation: 41
I need to set IP adress on Android phone from my own application, any idea?
Upvotes: 1
Views: 4814
Reputation: 11
If you have busybox, installed, try opening a shell within your code and typing the following: busybox ifconfig eth0 IP_ADDR_YOU_WANT
Upvotes: 1
Reputation: 6854
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.
Upvotes: 1
Reputation: 39604
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.
Upvotes: 0