Questions tagged [react-native-community-netinfo]
61 questions
1
vote
0 answers
install @react-native-community/netinfo
I have installed the @ react-native-community / netinfo package in the reactnative project, but the following error will appear when executing. Please help me
PS C:\Users\Mohsen\Desktop\irantimesheet> npx react-native run-android
warn Your project…

Mohsen Moradi
- 21
- 1
- 3
1
vote
2 answers
Meteor.connect throwing error in React Native (Version 0.61.5)
I'm using react-native-meteor module in react-native-app to connect it to Meteor server.
On Calling the following function in App.js ,
Meteor.connect('ws://192.168.x.x:3000/websocket');
I was getting this error
Invariant Violation: NetInfo has…

ImFarhad
- 2,669
- 2
- 18
- 30
1
vote
0 answers
react-native netinfo behaving strange in ios
System Environment:
OS: Windows 10 OS 64 bit
CPU: Intel core i7-9700k @ 3.60GHz
Memory: 550.87 MB / 16.00 GB
Platforms:
Issue related to both Android and IOS
Versions :
Android: 9
iOS: 13.1.3
react-native-netinfo: 5.0.0
react-native: 0.61.4
expo:…

user3016257
- 81
- 1
- 5
1
vote
0 answers
Checking internet connectivity doesn't work on my android but works perfectly on my ios device
I'm trying to detect internet connectivity on my react-native app.This works perfectly in ios but doesn't work on android.
First I tried importing net-info from react-native. Post this, I tried using the dependency react-native-community/net info…

Aishwarya R M
- 123
- 1
- 10
0
votes
1 answer
Gradle sync failed, (Operation not permitted)
Im facing this error in android studio Im using react-native with these dependency versions
"react": "16.8.3", "react-native": "^0.59.10", "@react-native-community/netinfo": "^3.2.1",…

Sami Ullah
- 717
- 8
- 14
0
votes
0 answers
How to set a dynamically changing timeout for API calls in React?
I am making API calls wrapped in a timeout method that times out in the time that I define in the method call
function timeout(promise: Promise, ms: number): Promise {
return new Promise((resolve, reject)=>{
…

Fclass
- 69
- 6
0
votes
0 answers
Execution failed for Task :@react-native-community_netinfo:compileDebugJavaWithJavac FAILED'. React-native
My react native project fails to build app and gives this error:
Task :@react-native-community_netinfo:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task…

Shashank Sai
- 1
- 1
0
votes
0 answers
React native NetInfo wifi issue with flashing NoInternetConnection component
I'm trying to detect if user is connected to the internet. My problem occurs when user is connected to wifi but still have access to mobile internet, then when user turn off wifi (still connected to mobile internet) isInternetReachable state changes…

Freezy
- 89
- 1
- 8
0
votes
3 answers
How to run a useEffect once after internet connected value is set to true?
I'm trying to run several functions in a useEffect after the internet connection state resolves to true. But at the start, the status will be null and then it will resolve to true. As a result the rest of the functions will not be invoked. How to…

tharwi
- 67
- 11
0
votes
1 answer
how to use Netinfo in if statement in React Native Typescript
i need to use the NetInfo.isConnected in a variable to send to my if statement, but all examples i see in internet are the same, just console.log the value, never put inside a variable
function verifyConnection() {
let isConnected;
…

user20372455
- 13
- 1
- 2
0
votes
1 answer
checking @react-native-community/netinfo network connection in react native isconnected is not working
I have a problem with my application. I am actually doing a network connection check in the application before I can make an API call. I'm not connected to the internet but I'm getting a contrary response from the library…

johnsyntaxe
- 9
- 3
0
votes
1 answer
how to use netinfo inside reducer or custom function
I'm making an offline-first app with react-native, expo and redux, I need to send the user changes back to the server depending on the internet connection, so I'm using expo-background-fetch to get this task done periodically with a custom function…

Santiago Gonzalez
- 45
- 5
0
votes
1 answer
What are the alternatives of NetInfo API in react native for checking network connectivity in mobile app?
I am looking for alternative APIs of NetInfo. I have been trying to use NetInfo API as well as react-native-offline (which uses NetInfo behind the scenes) to check constantly if the user is connected to the internet or not in the app and render…

Soham Jani
- 1
- 1
- 4
0
votes
1 answer
How to implement NetInfo to check network connectivity across different screens?
I have attached a snipped of a component called ConnectionChecker which I have wrapped around all the screen navigations. I have used NetInfo to check for the internet connectivity in the Connection Checker component, checking the connection for all…

Soham Jani
- 1
- 1
- 4
0
votes
2 answers
Correct way to subscribe and unsubscribe React Native Netinfo
Based on the documentation in here to subscribe and unsubscribe Netinfo listener - https://github.com/react-native-netinfo/react-native-netinfo
I define the listener method in a common file and export it
/* util.js */
function listener(){
…

Fred A
- 1,602
- 1
- 24
- 41