Android is known and loved for the extensive amount of automation and customization that can be achieved through its APIs. One of those is giving apps the ability to turn on and off Wi-Fi without user input. Tasker and IFTTT are major beneficiaries of this capability, but there is always malware that could abuse access to that system feature. To prevent that, Android Q will cut off apps' access to Wi-Fi settings.

This change is already alive and well in the first developer preview. When I tried to set up a new device on Google's own Home app with Wi-Fi turned off on Android Q, I was greeted by an error message pointing to other problems since Home doesn't yet know that it can't access the API:

Google recommends developers use the new settings panel prompt and make users toggle Wi-Fi themselves. While this is a viable solution for Google Home, it will cripple apps like Tasker and IFTTT, since they aim to automate exactly that for users.

Apps running on Android Q cannot enable or disable Wi-Fi. The WifiManager.setWifiEnabled() method always returns false.

If needed, use a settings panel to prompt users to enable and disable Wi-Fi.

Source: Android Developers

Via: Reddit