I have a problem with take photo from camera. App will reload then click tick button
My code:
ImagePicker.openCamera({
width: 640,
height: 640,
compressImageMaxWidth: 640,
compressImageMaxHeight: 640,
compressImageQuality: 0.75,
cropping: true
})
Added to AndroidManifest.xml:
android:largeHeap="true"
Android default config:
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
Any idea?
Love react-native-image-crop-picker? Please consider supporting our collective:
馃憠 https://opencollective.com/react-native-image-crop-picker/donate
+1
+1 this happens sometimes for me as well
+1 for me as well
some android phones always have that problem, and for others it happens sometimes
+1 :/
I think this happens when mainActivity becomes closed (by system) while camera (or gallery) activity is opened.
As mentioned here #505 you can debug this with the option: Settings->Developer options->Apps->Don't keep activities
For me:
I'm not sure that it is possible to completely fix this issue at react-native app.
This need to be investigated by someone with good understanding of android app lifecycle methods and react-native internals.
Keywords for further investigation: onActivityResult, Don't keep activities
If someone will have a solution, please right back a comment.
Any update?
any update?
Any update?
This is not working on devices that have 1gb of RAM. I tested in my phone S7, it's working perfectly but in my old tablet (Samsung Tab E) sometimes works sometimes not.
Any solution?
the company suggests that you need to save the state at the time of onStop, and restore it on onCreate. in MainActivity, but I don't have the code. for those who do not know what to do, there is a solution without using this library. You can output a stream from the camera directly to the react-native app using react-native-camera. And to get photos from the library and crop them, use this library.
Most helpful comment
I think this happens when mainActivity becomes closed (by system) while camera (or gallery) activity is opened.
As mentioned here #505 you can debug this with the option: Settings->Developer options->Apps->Don't keep activities
For me:
I'm not sure that it is possible to completely fix this issue at react-native app.
This need to be investigated by someone with good understanding of android app lifecycle methods and react-native internals.
Keywords for further investigation: onActivityResult, Don't keep activities
If someone will have a solution, please right back a comment.