Android – How to reset/renew DHCP in android

androidandroid-intentandroid-ndk

I want to reset/renew the DHCP in android through code so is there any way/command to achieve the same?

Best Answer

Try using the WifiManager methods: call disconnect, then reconnect. You'll need to make sure you have the appropriate permission: I think you'll need ACCESS_WIFI_STATE and CHANGE_WIFI_STATE at a minimum.

See if that works for you.