How can I keep the brigtness on call? - react-native

I am builded video call app with agora.io. but after a while the screen light turns off on both sides. I just have to keep the screens on during the video call. How can I do this without using plugins? I could not find such a thing in the agora documents.

this functionality is not provided by Agora. You have to use other external libraries for doing this. Expo keep awake is a fantastic solution. https://www.npmjs.com/package/expo-keep-awake
Make sure you have configured unimodules first before installing expo packages.

Related

Mobile app using react-native-cli or expo-cli?

I'm going to make my first app in React Native. I have windows, but I want to make this app cross-platform. I want to use camera for making short videos (like tiktok) on this app.
Can I make this app using windows? and what I need to use? expo or react-native-cli?
Thank you!
I think that is a question about an opinion. To use the camera you'll need native modules, idk if expo allows that, some time ago didnt allow but idk what is status of expo now. Beyond that, IMHO you could begin with rn cli directly because this is the most used in "the real life" and no has a big difference with expo.

How to measure react native (Expo) app startup time?

I have an Expo hybrid app (Managed workflow), running on Expo SDK v37 (React Native v0.61).
I'm struggling to find the best way to measure the time it takes from the moment when the user starts the app until the splash screen disappears.
How would you approach this?
PS: I would use Firebase Performance Monitoring instead, if it was available for Expo Managed apps. But it isn't yet.
Basically I see two approaches:
For pure react-native projects you can use react-native-startup-time library.
However I'm not sure, whether you can just add this library and start to use it, since it's required linking.
But in any case you can eject your project and add this library.
If you don't want to eject expo project I can suggest you to update your project to SDK 38. It has support for RN 0.62.2 and flipper integration as well. So you can setup flipper-plugin-react-native-performance and check the performance.
I hope I helped a bit.

Using Exp development workflow with a pure react-native application

Might be a duplicate, didn't find one tho.
I started a new application with the react-native-cli.
I want to use expo for development purpose:
Running on devices through Expo.
Publishing through Expo.
Is such a thing possible?
Copy pasting your 2 questions in Google and the first result...
1.
https://docs.expo.io/versions/latest/guides/testing-on-devices/
2.
https://docs.expo.io/versions/latest/workflow/publishing/
any questions left???
No, its not possible, in the docs its explicitly mentioned you can choose either the expo path or bare react native path. And if you choose expo you can eject from it to pure react native but cant go vice versa because the expo wrapper cant be implemented on the bare app.
so you have to again build an app with expo-cli to use expo publishing facilities etc.
but if you want to use expo modules in bare react native app you can do by using react-native-unimodules .
rn-unimodules
hope it helps. feel free for doubts
If anyone is ever looking for the answer it is stated here:
https://docs.expo.io/versions/v35.0.0/introduction/managed-vs-bare/#bare-workflow
It clearly states that in "bare" workflow you cant use the build services of Expo.

Is it possible to download YouTube videos with Expo?

I'm looking at being able to download YouTube videos within a React Native app created with Expo. I'm currently using Expo's FileSystem.downloadAsync, however this requires a direct URL to the resource to download. I've come across quite a few packages such as youtube-dl but they all require Node.JS to run.
My next thought was to use Node.JS within my app using nodejs-mobile - until I found out that you need to eject from Expo, which I definitely don't want to do.
Does anyone know of a way to download a YouTube video within an Expo app? Or just simply get a direct file link to pass into FileSystem.downloadAsync?
You might be able to use react-native-ytdl to get the direct video URL via their getInfo method (see this example) and then still use FileSystem.downloadAsync to download the file(s).
Since no linking is required, you wouldn't need to eject.

Cordova Plugin to be used in Worklight, for geofencing in Background even if the app is suspended/terminated and also when the phone restarts

I have been investigating in this feature for a long time. All I can find is a pure iOS native code that checks for the key "UIApplicationLaunchOptionsLocationKey" from the LaunchOptions, if it is found it calls the LocationManager to start it and keep on listening to the location updates.
You can find this code in this github:
https://github.com/voyage11/GettingLocationWhenSuspended
I need the same concept, but with a way to integrate it in Worklight, through cordova plugin or something. As I'm already creating the geofencing triggers using the hybrid Worklight APIs, I need to keep the geofencing alive even when the app is suspended/terminated and also if the phone is restarted.
Please I need you support urgently. Thanks
Worklight provides the ability to create Cordova plug-ins.
You could implementing your own native code then, mimicking that from the Xcode project you've found on GitHub.
Read more here: Adding native functionality to hybrid applications