App restarts after taking a picture. Google Pixel Android 7.1.1
See original GitHub issueWorks fine on Moto 3, Lenovo K5 Plus running Android 5.1.1.
However, after taking a photo on Google Pixel 7.1.1, the app restarts. Choosing image from photo library works fine though. My Options:
var options = {
title: 'Select meal image',
storageOptions: {
skipBackup: true,
path: 'images'
},
quality: 0.6,
mediaType: 'photo',
maxHeight: 2000,
maxWidth: 1000
};
getBreakfastImage() {
this.setState({
breakfastLogged: true,
});
ImagePicker.showImagePicker(options, (response) => {
if (response.didCancel) {
}
else if (response.error) {
}
else if (response.customButton) {
}
else {
let source = { uri: response.uri };
this.setState({
breakfastImageCount: this.state.breakfastImageCount+1,
imageCountStatic: this.state.imageCountStatic+1
});
breakfastImages.push({
key: this.state.breakfastImageCount,
imageSource: source,
imageID: null
});
breakfastImages64.push(
response.data
);
this.setState({ reRender: Math.random() });
}
});
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:33 (6 by maintainers)
Top Results From Across the Web
App restarts after taking a picture. Google Pixel Android 7.1.1
Works fine on Moto 3, Lenovo K5 Plus running Android 5.1.1. However, after taking a photo on Google Pixel 7.1.1, the app restarts....
Read more >Fix a Pixel phone that's restarting or crashing - Google Support
Try the following steps if your phone has any of these problems: Randomly reboots or restarts; Shuts down without restarting; Restarts constantly: Go...
Read more >Random reboot - any Pixel 6 (non pro) users affected?
When I was configuring telegram, the app crashed and then the screen got black. After a minute it rebooted to the Google logo...
Read more >Why Does Android Randomly Restart? - Technipages
In most cases, random restarts are caused by a poor quality app. Try uninstalling apps you don't use. Be sure the apps you...
Read more >[SOLVED] Camera plugin restart App on Android - Ionic Forum
Following this Android 7.1 (Google Pixel) Camera plugin broken? topic ... the camera lag and even restart the app after having take a...
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 FreeTop 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
Top GitHub Comments
@haitaoli I have the same issue, running Android Marshmallow on Moto G2. App restarts with splash screen. Since the components are reinitialised, I lose the captured images reference, the image remains saved in phone gallery applications.
Works fine when choosing image from gallery.
Went though other similar issues, couldn’t find anything that helps.
The issue got fixed when I changed the version in the package.json from “react-native-image-picker”: “^0.28.0” to “react-native-image-picker”: “0.28.0” and did an npm install.