Android modem how to disable dhcp

Using WifiManger and reflection (to find the enablewifiap () method), I can turn on the Wi-Fi modem to create a Wi-Fi access point.

However, I would like to disable DHCP for other devices that will connect to the phone, which acts as a hot spot. I can not find any functions that could achieve this. Anyone have a solution?

+5
source share
1 answer

There are no functions open through WifiManager, WifiServiceand NetworkManagementServicewhich can disable DHCP for Wi-Fi AP (as far as I can see from this code). You can check the NetworkManagementServicecode closer (especially setAccessPoint) if you are interested in implementation details.

+1
source

All Articles