Screen Flashes When App Opens Camera and return back to screen
See original GitHub issueI am using react-native-image-crop-picker to open camera and capture picture
Version
- react-native-image-crop-picker v0.37.2
- react-native v0.66.4
- react-native-screens -v3.10.1
Platform
- iOS
Expected behaviour
After capturing the image using
Screen should not flicker as shown in attached video
Actual behaviour
Screen flickers once after closing the camera
Steps to reproduce
1.ImageCropPicker.openCamera({ width: 300, height: 400, cropping: true, includeBase64: true, });
- capture image and click use photo once camera closed and it returns back to app screen, screen flickers
Attachments
###Code For Camera Permission I am using react-native-vision-camera
const onTakePicture = useCallback(async () => {
if (onPressPrimaryBtn) {
onPressPrimaryBtn();
} else {
const camPermission = await Camera.getCameraPermissionStatus();
console.log(camPermission)
if (camPermission === CAMERA_PERMISSIONS.AUTHORIZED || camPermission === CAMERA_PERMISSIONS.NOT_DETERMINED) {
const image = await Camera.capturePhoto();
image &&
toScreen &&
navigation?.navigate(toScreen, {imagePath: image?.path});
} else if (camPermission === CAMERA_PERMISSIONS.DENIED) {
//To Do Custom Modal
return Alert.alert('Camera', 'Camera Permission Has To Be Enabled', [
{
text: 'Open Settings',
onPress: openSettings,
},
]);
}
}
}, []);
#Camera.capturePhoto
static capturePhoto = async () => {
return await ImageCropPicker.openCamera({
width: 300,
height: 400,
cropping: true,
includeBase64: true,
});
};
Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
why are my apps flashing then going back to the home screen ...
Try as "Back" said hard reset it. ... I got the solution just go in settings then apps then open the three dot...
Read more >“Flashing” Screen as if a photo is being … - Apple Community
To check open System Preferences and select the Universal Access pane. Then select the Hearing tab, the first tick box has the option...
Read more >Is Your Phone Display Flickering? Try These 7 Fixes
The first thing to do when trying to fix a glitching phone screen is to restart your phone to ensure that this isn't...
Read more >How to Fix Screen Flickering on Android - Lifewire
Stop your Android screen from flickering or acting glitchy. Try these steps to diagnose, troubleshoot, and repair a flickering display.
Read more >Phone Screen Display Glitching, Flickering & Flashing - Updato
One of the main reasons that older devices can have the screen flickering issue is due to a sort of software struggle. Under...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
no worries @jforaker I got this, i used patch-package to use the patch and its working as expected. closing this issue as this is not a react-native-screens issue .
Thanks @jforaker for all your help
@MaganAnkur - I’m not sure, I don’t have experience with that actually – I was just crossposting because I’ve seen the issue before. Best of luck.