Search code examples
androidwifiandroid-wifi

What Permissions are needed in Android Connect to WiFi


What permissions does my app need to connect to a WiFi or change the current connected WiFi?
I've been trying the answers in the following StackOverflow link How do I connect to a specific Wi-Fi network in Android programmatically?


Solution

  • If you want to connect to a wifi network from within the app rather than relying on user interaction, you should need the following permissions:

    android.permission.INTERNET
    android.permission.ACCESS_NETWORK_STATE
    android.permission.CHANGE_WIFI_STATE
    android.permission.ACCESS_WIFI_STATE