Get user screen orientation lock react native - react-native

I'm using expo screen orientation package to handle my apps screen orientations but it does not take into consideration if the user have turned auto rotate on/off in the device settings.
I tried the react-native-orientation-locker package as well but I can't get that to work at all on my app for some reason.
Is there any way of telling what the user preference is regarding the auto rotate? I can't find any examples of it anywhere. Surely others needed this info as well.

Related

How to fully disable screen casting, screen mirror, smart view, etc

We are developing a unique streaming app for special content. Due to the content rights and the release window, we can't allow users to screen cast from their phone or tablet to a TV. So, we would appreciate your guidance and support on how we can fully disable casting, mirroring, etc. in Android.
We've tried a few things and are able to disable screenshots and digital recording e.g. loom. When we screen record, the sounds is recorded but the image is black. So, we've been able to successfully disable screenshots and screen recordings. However, we're unable to stop screen mirror, smart view, airplay and casting.

ReactNative doesn't respond to OrientationChanges

I'm trying to implement a navigation that pushes the user to a different screen when switching to landscape mode. I've tried for several hours now to implement an event listener to respond to an orientation change, which didn't work (I tried different examples from different websites).
Now, I took a full code example from here and here which also didn't work at all. (The first one just changes the text on the screen depending on the orientation, even that didn't work for me -.- )
I also tried to look into ScreenOrientation from Expo-Cli directly (expo-screen-orientation), but don't really get the documentation tbh.
I tried the orientation change on both an android emulator and my android phone (both Android 10).
Is there something I'm terribly missing here? How come that my app not respond to orientation changes?
Have you checked that the Device Orientation is not forced to Portrait in Xcode ? To check this go in Project -> General -> Device Orientation
Had the Device Orientation locked inside the app.json -.-

React Native - Detect Physically Broken Screen

Im trying to develop an app in react native that can detect if the screen of the user is physically broken. It's for an insurance company that wants to check if someone's phone isn't already broken when they insure it.
Obviously I can just ask the user to take a picture of the phone pointing at a mirror and validate it my self.
But instead, i've been wondering if even such technology exists or maybe there is work around for the matter. Probably painting the entire screen to detect pixel by pixel if any is broken but I don't know how to do that or what to use.
If anyone knows if a way exists I would be very grateful.
TL;DR- No.
Not only in react native, even in native android or ios api there is no such thing to check screen damage.
As far as your app is concerned, user involvement is necessary to detect screen or touch damage.
Just display different colors on screen and ask user to check for any discoloration or “dead” pixels.
And for touch, ask user to tap different parts of screen or drag finger accross and check for touch misses or bad areas.
There are some good touch testing apps available on the play store, give them a shot.

React native detect whether phone screen is off

I'm making an app which wants the user to keep the app open and not using other apps (to help them focuses on works), but allows them to turn the phone screen off. I used AppState API to detect if the app running in the background but it also triggered when the screen turned off.
So I need a way to know if the screen is on or off. I tried googling around but I couldn't find any solution.

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.