[Camera Plugin] App crashes after confirming picture
Question
camera-plugin
Mobile icon
Forge component by Platform Maintenace

Hi guys,


A month or two ago, my phone started crashing everytime I try to use the camera plugin.

On every app with the plugin, I have allowed permissions to use/access my camera. I take the picture, see its preview and once I click OK, the app crashes.

I've been noticing these errors:

My phone is a LG G6, Android v8.0.


Thanks!

Champion

Sónia Ferreira wrote:

Hi guys,


A month or two ago, my phone started crashing everytime I try to use the camera plugin.

On every app with the plugin, I have allowed permissions to use/access my camera. I take the picture, see its preview and once I click OK, the app crashes.

I've been noticing these errors:

My phone is a LG G6, Android v8.0.


Thanks!

You can see, the error in the snapshot you attached says:

It requires Internal-External Read-Write Storage Permission, which either may not be handled in the plugin or either you may not provided.

You can go to Application in Settings & check which permission it requires or the one you provided.

If you don't find the permission for R/W Storage, just report to the Owner so that he can update the plugin or you can check the Git-repository URL & refer the latest version of the plugin which may solve your issue [If that is implemented]

Also even if it like permission added & provided then the Plugin itself didn't use the API to fetch the Image URI.. the way it required right from Android 8.0 & in 9.0

But I did check on the Plugin description & they mention that they support till Android 9.0 which API 28.

Maybe you are using the outdated version of this plugin !!!


Hope it helps




Include this JSON in the Extensibility Configurations property of the app:

{ "preferences": { "android": [ { "name": "Permissions", "value": "['android.permission.WRITE_EXTERNAL_STORAGE','android.permission.CAMERA']" } ] } }

Hi Guys.

I have the same problem. But the problem happens only on Motorola G8 Power Plus Lite model.

On these models, the application doesn't crash: Samsung S7 Edge, Samsung J7 Prime, Motorola G3 and Samsung A1.

Would this problem be something exclusive only to Motorola's model or Android version?

The MABS version used to build my app is 7.0, but I had used 5.5 and the same problem happened.

Correction: The MABS version used to build my app is 7.0, but I had used 6.3 and the same problem happened.

Has anyone found the answer for fixing the problem with the camera plugin? I am experiencing issues when taking and confirming pictures.

Hello OutSystems Community!  

We believe that the behaviour that is reported in this thread could be related to a memory issue, that is, if the device does not have the necessary memory left when coming from the Camera view back to the app, the operating system can kill the app. In that case, we suggest lowering the picture quality to avoid this.

Please let us know if this suggestion helped, and if so, we would kindly ask you to mark this answer as the solution.


Best regards,

Alexandre Jacinto

This does not help @Alexandre Jacinto. I tried this and still get the same result.

Hi Alexandre,

That suggestion worked for my device, however, lowering the picture quality isn't a solution. It's a workaround.

Also, we can't ask to users take pictures with lower quality... Before this upgrades, camera plugin worked fine. I don't think it's supposed the upgrades looses features.

Do you know if OutSystems Team is already trying to fix this?

Thanks in advance,

Miguel Silva

Hi @Alexandre Jacinto. we are having the same issues on Android 11, using the latest version of the plugin 7.1.5. 

Could it be related to this bug Not working for Android 11 - Apache/Cordova-Plugin-Camera (issueexplorer.com) 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.