Closed ghost closed 5 years ago
After select photo from Library, the app crash on android device only. Error: "Cannot read property 'readerQR' of undefined". And the Path is there, please check below:
data:"iVBORw0KGgoA..." fileName:"52962324993480.png" fileSize:34969 height:1313 isVertical:true originalRotation:0 path:"/storage/emulated/0/Download/52962324993480.png" type:"image/png" uri:"content://media/external/images/media/193282" width:1080
code: accessGallery = () => { ImagePicker.launchImageLibrary({}, response => { console.log(response); if (response.error) { Alert.alert(response.error); return; } if (response.uri) { let path = response.path; if (!path) { path = response.uri; } console.log(path); QRreader(path) .then(data => { this.onSuccess({ data: data }); }) .catch(() => { Alert.alert(localizeString('QRCode.invalidImage')); }); } }); };
Any Solution ?
So you get the data but is crash?
Hi @nongh90 it was a missing in the Android Packages(), Thank you
After select photo from Library, the app crash on android device only. Error: "Cannot read property 'readerQR' of undefined". And the Path is there, please check below:
data:"iVBORw0KGgoA..." fileName:"52962324993480.png" fileSize:34969 height:1313 isVertical:true originalRotation:0 path:"/storage/emulated/0/Download/52962324993480.png" type:"image/png" uri:"content://media/external/images/media/193282" width:1080
code: accessGallery = () => { ImagePicker.launchImageLibrary({}, response => { console.log(response); if (response.error) { Alert.alert(response.error); return; } if (response.uri) { let path = response.path; if (!path) { path = response.uri; } console.log(path); QRreader(path) .then(data => { this.onSuccess({ data: data }); }) .catch(() => { Alert.alert(localizeString('QRCode.invalidImage')); }); } }); };
Any Solution ?