I'm using a React Native app built with expo. I wanted to know how to detect slow internet connection using it.
If you are using expo then you can check the netinfo docs, where type of connection will give an approx of network speed. expo netinfo
If you want to check the network status that suddenly it went down or offline you can use the react-native-offline library as it constantly pings and checks , and its documentation is good . react-native-offline
Related
Is there any way to connect to telnet server and send commands via react native ?
I Tried to test this library i facing errors because its have old dependencies and way to fix it ?
Have you read the documentation that the site provided? https://www.npmjs.com/package/telnet-client ,
if you have implemented it already, why not show the error ?
I have implemented the agora in my react native application by following the library documentation and also referred to this link.
I am able to see remote user video and local video in the application when it is running in the foreground state.
The main issue I am facing is when the iOS application is not running state. When I took the call in not running state, I can view my local preview but the remote user video is not visible in the app. But the remote user can see my preview, which means the channel was established successfully.
I tried setting fixed width and height to
RtcRemoteView.SurfaceView
but no change in result.
I am not able to figure out what I am doing wrong. So please help me to find a solution here.
Thank you !!
React Native: 0.62.2
Agora: 3.5.1
I would recommend using the Agora UIKit for React Native, it will take care of a lot of the work for you. The repo you've linked to hasn't been updated in almost a year now.
The UIKits are across 6 platforms, and updated all the time.
Max
The mirror mode is by default enabled when using the front camera and disabled in the rear camera. If you want to enable the mirror mode on the local device, please update the _renderVideo as following (highlighted part)
please use mirrorMode={VideoMirrorMode.Enabled} in RtcLocalView.SurfaceView
Please let me know if this helps or not.
I started a new ReactNative app and tried to use webview for playing Youtube Video
It was ok the last time i used it but this time when i install the package i get a high vulnerability message :
" High Universal XSS in Android WebView"
More info : https://npmjs.com/advisories/1560
My questions :
can we use it despite this message or it will be rejected by the Play Store ?
otherwise do you know how to fix it ?
Or
do you know another way to do it (without using react-native-youtube)
It is good that you are security aware!
Can we use it?
I don't think Google will reject your app. In other words, we launched a few apps using react-native-webview and did not experience any problem when launching on Google Play.
This vulnerability affects React Native apps which use a react-native-webview that allows navigation to arbitrary URLs. I don't think you use the webview that way.
So, yes, I think you can use it.
How to fix it?
As found in the advisory https://npmjs.com/advisories/1560:
Ensure users update their Android WebView system component via the
Google Play Store to 83.0.4103.106 or higher to avoid this UXSS.
'react-native-webview' is working on a mitigation but it could take
some time.
So you have to be patient and wait for a fix. The way you use it is save.
We're trying to build an app that can track the location of the device on-demand. So admins could send a ping signal and get back the current location of the device. Sort of like (find my phone). The functionality should work even if the app is in the background, when the device is locked, and even be available after a device restart without having to open the app first.
We're building the app using React Native and we were looking at some options for background services and push notifications but none seem to satisfy our needs. Any ideas?
You might be interested with this paid solution: https://www.transistorsoft.com/shop/products/react-native-background-geolocation
Using create react native app, I get this error when I scan the QR code from the package manager:
java.net.SocketTimeoutException - connect timed out
I have my Samsung s8 connected via USB, I can see the following json when I browse to the address using http instead of exp:
{"sdkVersion":"23.0.0","name":"tester1","slug":"tester1","version":"0.1.0","xde":true,"developer":{"tool":"crna","projectRoot":"C:\\sites\\tester1"},"packagerOpts":{"hostType":"tunnel","lanType":"ip","dev":true,"strict":false,"minify":false,"urlType":"exp","urlRandomness":null},"env":{},"bundleUrl":"http://169.254.140.132:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=C:\\sites\\tester1\\node_modules\\expo\\tools\\hashAssetFiles","debuggerHost":"169.254.140.132:19001","mainModuleName":"./node_modules/react-native-scripts/build/bin/crna-entry","logUrl":"http://169.254.140.132:19000/logs","id":"#anonymous/tester1-e649dd6c-008d-4356-a9eb-0f80bb8a6a98"}
Can anyone please help? I've spent ages trying to get this working
I disabled my other connections. Expo was defaulting to the wrong IP.
Control Panel > Network and Internet > Network Connections