React Native - Detect Physically Broken Screen - react-native

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.

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.

Get user screen orientation lock 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.

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.

iOS : Disable Push Notifications drop down tray programatically

In my app design, I have a dropdown menu from the top as the user swipes down the top edge of the screen. This interferes with the Push notification tray. Is there any way to disable the default tray dropdown when my app is in the foreground?
Currently, there is no public API for manipulating the behavior of the notification center or how to prevent it.
I think it is a design decision to keep a consistent user experience at the price of developer freedom. I do not think it's not likely that an app will ever be able to block a notification's appearance, and only slightly less unlikely that an app would be able to prevent the notification center from appearing.
After all, it is what made iOS so successful. The consistency between the operating system and apps in general.

Customizing iPhone app taskbar

I thought that it was not allowed to customize the taskbar on the iPhone. However, I noticed this app called iHandy Tip Calculator which replaces the battery icon with a fast switch icon, that pops up a view as shown. How is this allowed, and if so how can I be doing something different?
If you run the app on an iPad, you'll see, how they do it: they are overlaying the normal status bar. Also note, that the screenshots in the app store don't show this feature. I assume, they were fearing to get rejected and disabled the overlay for the screenshots.
Apps from this developer iHandy incorporate this into the status bar, but I've never seen another company do this. I am surprised that the status bar is able to be modified in this way in any event.
My question on apple.stackexchange is posted over here:
https://apple.stackexchange.com/questions/71969/what-is-the-meaning-of-this-status-bar-icon
It is possible to create your own statusbar and "simulate" the network status and battery life etc in a 'full-screen' app. But apple doesn't allow it, but this might be one that 'slipped through' just like Gaz_Edge said.
You are correct. You are not suppose to be able to modify the 'springboard'. Apple normally refuse apps that do anything that modifies it. Maybe this one slipped through the net?
I just downloaded the latest version of iHandy Level (version 1.62.0) on an iPhone 5 running iOS 6 but don't see the icon (it's within the app rather than in the status bar). (And the status bar is hidden.)
I was curious to see if they actually hid the status bar and created their own custom status bar. If that was the case, you'd be able to tell because when you swipe down from the top for notification center, it would first show a little tab and then you'd have to swipe again to pull down the menu.
Guessing maybe they removed this functionality at Apple's request.
If anyone still has a version that shows it, please let us know if it shows the tab when you swipe for notification center. If not, they likely found some private api to allow them to replace the battery icon (which would be interesting).