Android disconnect() just returnstrue, but doesnt seem to disconnect from network?
See original GitHub issue1.
const disconnectFromNetwork = async (SSID: string) => {
const currentSSID = await WifiManager.getCurrentWifiSSID();
const isDisconnected = await WifiManager.isRemoveWifiNetwork(currentSSID);
console.log({ currentSSID, isDisconnected });
};
2.
const disconnectFromNetwork = async (SSID: string) => {
const isDisconnected = await WifiManager.disconnect();
console.log({ isDisconnected });
};
I’ve tried both of these, all I get is true, but the satellite icon is still on and it doesnt disconnect
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
NetworkInfo state for WIFI returns disconnected when no ...
I want to detect that Is Wifi connected to a network? Doesn't matter whether it has Internet connection or not.
Read more >Wi-Fi Keeps Disconnecting on Android? 11 Ways to Fix
Wi-Fi Keeps Disconnecting on Android? 11 Ways to Fix · 1. Open the Settings app and tap Network & internet > Internet. ·...
Read more >Connect to Wi-Fi networks on your Android device - Google Help
Disconnect Wi-Fi on your device · Open your device's Settings app. · Tap Network & internet and then Internet and then Wi-Fi. ·...
Read more >ESP32 Reconnect to Wi-Fi After Lost Connection network
Reconnect your ESP32 to a Wi-Fi network after losing the connection. Reconnect when the ESP32 loses Wi-Fi signal, router restarts, or other situations....
Read more >Bound services overview - Android Developers
A bound service is the server in a client-server interface. It allows components (such as activities) to bind to the service, send requests, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If I have some time I’ll look into it. For Android, I would suggest using
isRemoveWifiNetwork
for now.Questions:
And also, in my experience, if you use the disconnect function, but there is no other wifi network arround, Android silently reconnect.
Work for me to use isRemoveWifiNetwork() on Android. Thanks !