pendingResult parameter mssing from resume event

This is a complicated issue. I am using the cordova-plugin-camera plugin to allow my app to take photos. The users take many pictures all day long. There is an Android Quirk with the plugin which states:

“Android uses intents to launch the camera activity on the device to capture images, and on phones with low memory, the Cordova activity may be killed. In this scenario, the result from the plugin call will be delivered via the resume event. See the Android Lifecycle guide for more information. The pendingResult.result value will contain the value that would be passed to the callbacks (either the URI/URL or an error message). Check the pendingResult.pluginStatus to determine whether or not the call was successful.”

The users of my app encounter this issue (where the Cordova app is killed and the app seems to restart) on a regular basis even though they are running on newer devices with 8 GB of memory. (And yes, I am using the “destinationType: Camera.DestinationType.FILE_URI” parameter and setting the quality parameter to 25).

The problem is that the pendingResult parameter does not seem to be implemented in AppStudio.
Here is my code (captured using the Crome Debugger) for the resume event.

function onDeviceResume(event) {
  console.log("Resume event object:", event);
  if (event.pendingResult) {
    console.log("pendingResult IS present.");
  } else {
    console.log("pendingResult IS NOT present.");
  }

and the resulting Console Log output :

Resume event object: Event {isTrusted: false, action: ‘resume’, type: ‘resume’, target: null, currentTarget: null, …}
pendingResult IS NOT present.

Any suggestions on how to fix this?

Kindest Regards,
Robert

Our code does not handle the events at all, so event contains the raw data as passed to the callback without changes.

I would hook up the Remote Debugger when this happens (if you can), so you can look at the complete data returned in event.

You might also try this:

console.log(JSON.stringify(event, null, 2))