There is no listener like OnClick listener to listen to WiFi status/state change during an activity.
To Listen to WiFi state change we have a to register a receiver that receives WiFi state change.
The following code helps you to listen to WiFi status change while running app in foreground
These are normal (PROTECTION_NORMAL) permissions. So you don't need check at runtime.
To Listen to WiFi state change we have a to register a receiver that receives WiFi state change.
The following code helps you to listen to WiFi status change while running app in foreground
1.Add these permissions to your Manifest file.
These are normal (PROTECTION_NORMAL) permissions. So you don't need check at runtime.