Stay organized with collections
Save and categorize content based on your preferences.
WifiStateChangedListener
interface WifiStateChangedListener
Listener interface for applications to be notified when the Wi-Fi enabled state changes.
Summary
Public methods |
abstract Unit |
Called when the Wi-Fi enabled state changes.
|
Public methods
onWifiStateChanged
abstract fun onWifiStateChanged(): Unit
Called when the Wi-Fi enabled state changes. The new value can be queried via WifiManager.getWifiState()
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# WifiManager.WifiStateChangedListener\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nWifiStateChangedListener\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/wifi/WifiManager.WifiStateChangedListener \"View this page in Java\") \n\n```\ninterface WifiStateChangedListener\n```\n\n|------------------------------------------------------------|\n| [android.net.wifi.WifiManager.WifiStateChangedListener](#) |\n\nListener interface for applications to be notified when the Wi-Fi enabled state changes.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onWifiStateChanged](#onWifiStateChanged())`()` Called when the Wi-Fi enabled state changes. |\n\nPublic methods\n--------------\n\n### onWifiStateChanged\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onWifiStateChanged(): Unit\n```\n\nCalled when the Wi-Fi enabled state changes. The new value can be queried via [WifiManager.getWifiState()](/reference/kotlin/android/net/wifi/WifiManager#getWifiState())."]]