Hi Mash I tried on android and it worked. I know there are issues in while running on iOS simulator, but it isnt working for iOS device as well. App has to be re opened for it to work. What could be the problem?
Using the react-native-network-bandwidth-speed module, you can see the network bandwidth in result. www.npmjs.com/package/react-native-network-bandwith-speed
I have tried this example and it's working fine. I want to check internet connection not only in particular page. I want to make it check all over the application. How can i achieve it please help me
On iOS, make sure your app meets at least one of the following requirements: developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo?language=objc#discussion
3 года назад
How can I make the application connect to a new network?
There is no problem in using this module in functional components. This link may help you: stackoverflow.com/questions/62787980/how-do-i-access-reusable-netinfo-code-from-function-component-to-class-component
If you have any questions about this or request tutorials in this style, be sure to leave a comment below the video, and thank you for liking it. 😉
I'm using react-native v0.63 and react hooks for implementing this but it is not recognizing helper function in
NetInfo.addEventListener(state => {
console.log("Connection type", state.type);
console.log("Is connected?", state.isConnected);
});
Full code:
import {useState, useEffect} from 'react';
import NetInfo from '@react-native-community/netinfo';
let currentNetwork;
NetInfo.fetch().then(state => {
currentNetwork = state.isConnected;
});
const CheckConnection = () => {
const [netInfo, setNetInfo] = useState(currentNetwork);
useEffect(() => {
const unsubscribe = NetInfo.addEventListener(state => {
setNetInfo(state.isConnected);
});
return unsubscribe;
}, []);
return netInfo;
};
export default CheckConnection;
Hi Mash I tried on android and it worked. I know there are issues in while running on iOS simulator, but it isnt working for iOS device as well. App has to be re opened for it to work. What could be the problem?
Hi Mash! Thanks for your video turorial. I have a question. I´m wondering if the deatils strength would have realtion with rssi signal
Nice explanation, I resolved network problem as well as get ip address. Thank you ❤
Glad it helped
Very helpful and informative. Thank you!!
You are so welcome!
Thanks :) It's really helpful. I also liked that you summarized all at the end :P
Glad it was helpful!
Most Valuable video 👍
Excellent explanation, thank you very much, how can I know the quality or bandwidth of the internet connection?
Using the react-native-network-bandwidth-speed module, you can see the network bandwidth in result.
www.npmjs.com/package/react-native-network-bandwith-speed
@@mashschool Thank you very much.
I have tried this example and it's working fine. I want to check internet connection not only in particular page. I want to make it check all over the application. How can i achieve it please help me
Thank you!!
You're welcome!
clear understand
Thank you
You're welcome
Ser a que existe um pacote para Alterar IP da Rede?
How secure is this library
I using this in my project but when I run in ios the "ssid" value always return null, can you help me why ?
On iOS, make sure your app meets at least one of the following requirements:
developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo?language=objc#discussion
How can I make the application connect to a new network?
You can use this module : www.npmjs.com/package/react-native-wifi-reborn
@@mashschool Thanks. Congratulations for video.
i am not able implement this code in functional component
There is no problem in using this module in functional components. This link may help you:
stackoverflow.com/questions/62787980/how-do-i-access-reusable-netinfo-code-from-function-component-to-class-component
there is programming with mosh and now programming with mash. Both persian lol
this app give free inernet