Android delay with camera

Hi,

I’m building an app that needs to scan use the camera to scan QR codes. The little icon to search using the camera is there, but I sometime need to wait 5-10 secondes before the camera is activated (the camera opens on a black screen, then the image appear and the scan works).

It’s a new phone (Galaxy note 20).

Anybody had this issue before?