Taking photo sometimes does not work

Hi, Can you please help me regarding the following issue.
I would like to take a photo and draw on it. If i use the image picker, then it works all the time, but taking a photo with the camera many times does not place the photo to the canvas. When i try it again it sometimes work, sometimes not. I have tried many sample ai2 files and tutorials to test but they do the same problem as well. I test them on my Samsung SM-A300F with Android 5.02. Appinventor2 does the same problem just like kodular.
I have tried to change the android level to older ones, and even to 5.02, but it does not solve the problem.
Is there any who can help me, or send me a fail safe solution?
Thank you in advace!