apache / cordova-plugin-camera

Apache Cordova Plugin camera
https://cordova.apache.org/
Apache License 2.0
960 stars 1.52k forks source link

OnResume dosen't get triggered when the photo is taken (Android) #837

Closed matheus-inacio closed 9 months ago

matheus-inacio commented 10 months ago

Bug Report

Problem

I've subcribed to the onResume as documented, but i only get the event triggered (with the proper pendingResult value) when i cancel the photo.

What is expected to happen?

The app should be notified via the onResume event, with the taken photo.

What does actually happen?

If i take the photo, the app restarts but the onResume event never gets fired.

Information

I've had users reporting the issue on Redmi Note 7.

I'm simulating the issue by enabling Don't keep activities on the dev options.

image

Environment, Platform, Device

Android (8.1 and 13)

Version information

Plugin version: 6.0.0 Tested on android 8.1 and 13

goncalo-tomas commented 10 months ago

Hello, the same issue is happening in our application. However I'm using the outsystems fork: https://github.com/OutSystems/cordova-plugin-camera/tree/4.2.0-OS41

Some users with the following devices are having this issue were after taking the picture the app restarts: Redmi Note 11 -> Android 12 Samsung S21 FE -> Android 13

I was also able to replicate this issue by enabling "Don't keep activities" on the dev options.

matheus-inacio commented 10 months ago

@goncalo-tomas My app is also using the OutSystems fork.

I've created a cordova app from scratch, using this plugin, and the resume event triggered correctly, so i guess this may not be an issue in this repo .