Created
March 14, 2021 02:46
-
-
Save gpeal/4e32059a68f2984e01fc64707a7d79c1 to your computer and use it in GitHub Desktop.
Broadcast Receiver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.registerReceiverInScope(scope, WifiManager.WIFI_STATE_CHANGED_ACTION) { intent -> | |
val state = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_DISABLED) | |
// Use wifi state here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment