I am using latest version of ionic capacitor so there is no config.xml, so let me know what you're looking for and I can send that as well. I originally had the cordova-plugin-background-upload ...
When the camera detects motion, the script starts recording the file in the format like DCIM/2018-09/2018-09-27_19.34.mjpeg. When motion ceases, the recording is stopped.