Closed matthias-pichler closed 3 years ago
Hey @warrify! I've just asked our engineering team to check it out. We will come back to you as soon as we have any news!
Hi again @warrify! Does it work without the resumeShortBreakForAnotherApp? That isn’t needed here - you are just launching another component inside the app. ResumeShortBreak is for when you are going out to a different app - i.e. using Facebook app to confirm login - and will be away from your app for a few seconds but don’t want it split into two sessions. Please, let me know if it's clear!
I tried it without the resume but it still breaks :/
Hey @warrify, we've just fixed the issue! You can update your plugin to the 5.1.14 version and let us know if everything works correctly now :)
@warrify just one more thing:
Here is the working code snippet which might help you. We have tested this with the same library you mentioned.
pickSingle(cropit, circular=false, mediaType) { RNUxcam.allowShortBreakForAnotherApp(true); ImagePicker.openPicker({ width: 500, height: 500, cropping: cropit, cropperCircleOverlay: circular, compressImageMaxWidth: 1000, compressImageMaxHeight: 1000, compressImageQuality: 1, compressVideoPreset: 'MediumQuality', includeExif: true, }).then(image => { console.log('received image', image); RNUxcam.allowShortBreakForAnotherApp(false); this.setState({ image: {uri: image.path, width: image.width, height: image.height, mime: image.mime}, images: null }); }).catch(e => { RNUxcam.allowShortBreakForAnotherApp(false); console.log(e); Alert.alert(e.message ? e.message : e); }); }
if I call
Uxcam.allowShortBreakForAnotherApp(true)
before opening an image picker ( using react-native-image-crop-picker ) and callingUxcam.resumeShortBreakForAnotherApp()
in the finally block the app becomes unresponsive after closing the picker.Below is the code that reproduces the problem.
Tested on real Android device running Android v9 and using library version: 5.1.13