Multiple inconsistencies in lib behavior (Android)
See original GitHub issueTested on React Native (Android only):
- 0.59.8
- 0.60.3
- 0.62.2
We are trying to integrate this library in a production level. So far, we’ve stumbled upon numerous issues, that do not appear to have been resolved in version 4.1.0.
Xiaomi Redmi Note 8 Pro - MIUI version 11.0.3.0 (based on Android P)
- Wifi permission request loop that breaks randomly (with or without user interaction)
- Connects to Wifi with internet connectivity, but cannot perform external API requests
Huawei P30 Lite - EMUI version 9.1.0 (based on Android P)
- Connects to Wifi with internet connectivity inconsistently
- Cannot connect to IOT device in the same WLAN
Xiaomi A2 Lite - Android One (Android Q)
- Connects to Wifi consistently, always without internet connectivity
Example usage:
const connect = () => {
WifiManager.forceWifiUsage(true);
WifiManager.connectToProtectedSSID(ssid, password, false)
.then(() => {
// do stuff
})
.catch(() => {
// handle error
})
.finally(() => WifiManager.forceWifiUsage(false));
};
Based on the information above, can you point me to a certain direction as to what the issue may be?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Inconsistent behavior when compiling Android apps
I have two Android apps I'm looking at - one that I created a while back and another that I'm just making now....
Read more >Detecting Inconsistencies in Multi-Platform Mobile Apps - People
Abstract—Due to the increasing popularity and diversity of mobile devices, developers write the same mobile app for different platforms.
Read more >Known issues with Android Studio and Android Gradle Plugin
Fixed known issues · Lint exceptions in Kotlin projects: Kotlin projects that set checkDependencies = true may encounter null pointer exceptions or errors...
Read more >Android 7.0 Behavior Changes
This change in behavior aims to create a consistent app experience across platform updates and different devices. Even though your code might ...
Read more >Manage manifest files - Android Developers
xml file, but your Android Studio project may contain several—provided by the main source set, build variants, and imported libraries. So when ...
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
@dimgrav, looks like
forceWifiUsage()
causes some connectivity issues (see #76). If you are using a TCP connection to communicate with your IoT devices, a possible workaround isreact-native-tcp-socket
, it allows you to bind your socket to an specific interface (ethernet
,wifi
,cellular
, etc.) without forcing the whole app to use the WiFi connection.Disclaimer: I am the creator and mantainer of
react-native-tcp-socket
Yes it should be fixed.
What’s the code you are currently using?