Since setWifiEnabled is deprecated on Android 10, how does one programatically enable wifi on Android 10 devices?
Is it not possible to programmatically enable wifi at all on Android 10+ (SDK 29) ?
Since setWifiEnabled is deprecated on Android 10, how does one programatically enable wifi on Android 10 devices?
Is it not possible to programmatically enable wifi at all on Android 10+ (SDK 29) ?
Now in android 10 you can do like this
ACTION_INTERNET_CONNECTIVITY Shows settings related to internet connectivity, such as Airplane mode, Wi-Fi, and Mobile Data.
ACTION_WIFI Shows Wi-Fi settings, but not the other connectivity settings. This is useful for apps that need a Wi-Fi connection to perform large uploads or downloads.
ACTION_NFC Shows all settings related to near-field communication (NFC).
ACTION_VOLUME Shows volume settings for all audio streams.
No, This is not possible to
enable
ordisable
Wi-Fiprogrammatically
fromAndroid-10
API level 29
[Until google provides an alternative solution].There is an issue 128554616 which already has been created in
google issuetracker
forum. You can see there for any updated info.