Camera crashes app on Android11

My app crashes when user takes a picture. It seems that OS kills app when taking picture, but it happens only with camera in Android 11. Picking images from gallery works fine. Any ideas?
It was working fine before Android 11.

Using capacitor 3

More info please ? Code taking pickture ? Plugin used ? @capacitor/camera ? Did you add the permissions ?

Sure! Sorry…

Using plugin @capacitor/camera
All the permissions were set. Note that it works on previous Android versions.

On cap github they told me that its documented that OS may kill app in background.
It opens the camera, moving the app to background and then, when coming back to app, it restarts.

  let url = await Camera.getPhoto({
      allowEditing: false,
      source: CameraSource.Camera,
      resultType: CameraResultType.Uri,
      correctOrientation: false,

Ok, I use this plugin on several projects, and I’ve never had any problems. On phones ranging from android 8 to 12.
However, I never really tested on a low-cost phone.

Can ou try this ?

from Capacitor - build cross platform apps with the web

But before, again, check that you have the right permissions. Because since android 10 or 11 I don’t know anymore, the app kills itself if you access the camera without authorization