public boolean WifiManager.setWifiEnabled (boolean enabled)

This method was deprecated in API level 29. Starting with Build.VERSION_CODES#Q, applications are not allowed to enable/disable Wi-Fi. Compatibility Note: For applications targeting Build.VERSION_CODES.Q or above, this API will always return false and will have no effect. If apps are targeting an older SDK ( Build.VERSION_CODES.P or below), they can continue to use this API.

How can we disable WiFi on Android 29?

 

이 메소드는 API 레벨 29에서 더 이상 사용되지 않습니다. Build.VERSION_CODES # Q부터 애플리케이션은 Wi-Fi를 활성화 / 비활성화 할 수 없습니다. 호환성 참고 : Build.VERSION_CODES.Q 이상을 대상으로하는 응용 프로그램의 경우이 API는 항상 false를 반환하며 아무런 영향을 미치지 않습니다. 앱이 이전 SDK (Build.VERSION_CODES.P 이하)를 대상으로하는 경우이 API를 계속 사용할 수 있습니다.

Android 29에서 WiFi를 어떻게 비활성화 할 수 있습니까?

 



Toggling WiFi will not be allowed by apps starting from Android Q according to Google.

Here's the issue on their issuetracker: https://issuetracker.google.com/issues/128554616

Google에 따르면 Android Q에서 시작하는 앱에서는 WiFi를 전환 할 수 없습니다. 

https://issuetracker.google.com/issues/128554616에 이슈 트래커의 문제가 있습니다.

 

로그인 - Google 계정

하나의 계정으로 모든 Google 서비스를 Google 계정으로 로그인

accounts.google.com

 

 

+ Recent posts