Using cameraroll for react native on Android - api

I want to learn and know how to use the camera roll API on Android.
I stayed up all night and didn't sleep. I can use expo to get the camera, and I have seen the cameraroll working fine on iOS. Some people I have seen on Stack Overflow using the cameraroll API from react-native on Android without any third party, but never seen a full code example it's going to be between 30 to 50 lines. I've checked the documentation, and it mentioned Android, but the steps where used for iOS.
Everyone seems to be running away from it, and some people are unclear about it.

Related

How to show a 360 degree image in react native, in an expo managed workflow

I'm trying to implement a modal in which I show the user a 360 degree image and he can move the image freely, the problem is the only library I found for this, https://github.com/lightbasenl/react-native-panorama-view, can not be used in an expo managed workflow. I also found this old post How to show 360 images in the react native, but the answer is very old and I can't seem to make it work.

How to track GPS location of smart phone in react native

I am working on an app right now, which should track your GPS location to track your movements. Which mean your phone should track your position even when the app is not active.
How can I achieve this in react native? I've been struggling already a long time now.
If you develop on Android you can use Headless JS with this tutorial.
If you are on IOS you can use this library.

How To add Focus, Brightness and Zoom controls to react native camera?

I used react-native-camera on my iOS app and now trying to add Focus, Brightness and Zoom controls to it. So far I was unable to come up with a solution. Any idea how to do this?
I tried to find an option in different react native camera packages. Also posted in their git repos for help. Finally tried this post: https://medium.com/react-native-development/react-native-camera-app-with-live-preview-saturation-and-brightness-filters-d34535cc6d14 Where they take a photo from the camera every 5 milliseconds and adjust its brightness which seems to be very unstable and it makes the app crash.
It is not possible to use the focus and zoom functionalities with react-native-camera.
Unluckily the focus api has many bugs and the zoom functionalities will not render fast enough with javascript.
Maybe a solution is not using react-native-camera and instead just writing an intent to open the default camera application
The following app uses this solution, all the camera functionalities work perfectly.
Could they re-open the issue as it seems to not be solved?
Developers may need to review all the open issues to estimate the project deadlines.

How to slience the device (either ios or android) completely in certain time of the day with React Native

I want to build an app that mute the device in certain time of the day with React Native, that says, it should start running in the background once the phone is started. Is that possible? Or its something had to be done in the actual native code? I did research online but can't find a solution at all.

Why Should I Adopt React Native in Old Projects?

I've been digging deep in React Native for the past week to decide if I and the team should adopt it. And I gotta say it seems promising. I've also learned about its ability to integrate with existing native projects and its incremental adoption to change existing native projects.
My question is what are the cases/reasons that would make me wanna convert my completed old native projects (iOS/Android) into React Native?
Edit: Just to clarify, our team is currently building native apps only.
It depends on what type of app you are building. But you can always use bits of code from native or react native. Since you all can code in native, anything you cannot find you could make a native component.
The advantages of React Native show up with code reuse between iOS and Android so that your team can iterate faster working together. Many big apps have achieved 80% or more code reuse.
You will find flexbox so easy to quickly create views to specs and to change quickly with styles. Plus they are all in code and that plays nice with git.
See edit below:
Now in saying this I have never used React Native inside a native project but to call actions and such you would need to expose functions to call from the JavaScript side. I don't know if a singleton is generally used or just an import of the controller functions or delegated you want to expose but it has to call back to the native application . It is easy to use a native component inside a React native application and I have done this so I am sure it can work the other way.
Edit: Out of curiosity I added some react native views to a test project and it works surprisingly well. No singleton needed Javascript maps the view tag and the exported functions. Crazy. The concerns below still exist but I think if you are changing to change that is wrong but if you have UI changes you want to make then it could definitely benefit as your reuse can grow across your platforms.
Drawbacks I have seen- sometimes transition animations can be laggy if you are not using the native navigation methods. Using both native and React Native adds size to your app so you would need to keep an eye on that. Also start up time can hurt and so monitor that as well.
With all that said I have built a fair bit with React Native lately and it is, at times, beautiful and frustrating for a native developer.
Here is a great article on Instagram and React Native.
Also AirBnb heavily uses RN. They may be completely RN now but I am not sure. They do drive a lot of the outside frameworks in RN for example the maps component in RN. They also just released Lottie and it is very cool. Here is an article about AirBnb.