Using WifiManger and reflection(to find the enablewifiap() method), I am able to enable wifi tethering to create a wifi hotspot.
However, I would like to disable DHCP for the other devices that will connect to the phone that is acting as the hotspot.
I am not able to find any functions that would achieve this.
Anyone has a solution?
There are no functions exposed via
WifiManager,WifiServiceandNetworkManagementServicethat can disable DHCP for Wi-Fi AP (as far as I can see from thecode). You can inspectNetworkManagementService‘s code closer (especiallysetAccessPointfunction) if you interested in implementation details.