No, This is not possible to enable
or disable
Wi-Fi programmatically
from Android-10
API level 29
[ Until google provides an alternative solution ].
(否,这无法通过Android-10
API level 29
programmatically
方式enable
或disable
Wi-Fi [ 直到google提供替代解决方案 ]。)
For applications targeting Build.VERSION_CODES.Q or above, this API will always return false and will have no effect.
(对于面向Build.VERSION_CODES.Q或更高版本的应用程序,此API将始终返回false,并且无效。)
If apps are targeting an older SDK ( Build.VERSION_CODES.P or below), they can continue to use this API.
(如果应用程序以较早的SDK(Build.VERSION_CODES.P或更低版本)为目标,则它们可以继续使用此API。)
There is an issue 128554616 which already has been created in google issuetracker
forum.
(google issuetracker
论坛中已经创建了一个问题128554616 。)
You can see there for any updated info. (您可以在此处看到任何更新的信息。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…