Reputation: 2178
In my Ionic 5 app, I am using @capacitor/camera plugin. Following in the code.
let camOption: CameraOptions = {
quality: 100,
resultType: CameraResultType.Base64,
source: CameraSource.Photos
}
try {
const result = await Camera.getPhoto(camOption);
} catch (error) {
console.log(JSON.stringify(error));
}
When selecting a large image of a size of more than 10MB, I am getting the error {"message":"Out of memory"}
after few seconds of screen freeze. I see other Out of memory errors reported by users but not sure how to fix this scenario.
Upvotes: 1
Views: 677
Reputation: 5464
Try to add android:largeHeat="true"
so you Androidanifest.xml shoul look like
Upvotes: 0