At the moment, in Companion, App runs but is 'stuck' in camera view mode and as an APK, crashes on launch. However, we don't want to view either, just take photos programmatically at regular intervals without the User needing to control the shots.
So here are my Blocks, which may be of use if only to see why they don't work. I think I have to stick with Taifun's Camera extension as it can take shots purely programmatically.
You might want to try this aia, tested in companion and compiled on Android 11. It doesn't have the automated stuff, but you might be able to build on this from here. It appears that the Procam re-initialises the preview after a picture is taken, therefore time is needed to allow that to happen before going again.
Any tests I have done in trying to automate things have been buggy and resulted in crashes....what is your intended timeframe between snaps ?
It's a variable - for the garden birds, as rapid as possible. For my students project, every 5 - 10 minutes (front and back cameras). In both cases (+ others) no preview or any User activity (other than pressing 'start') required. Just like the Press photographers really, they can't see a preview, so they just blast a round off @ 1 per second.
So I'm mostly offline for the next few days, chasing channels in solid walls for new electrics. Amazing how heavy a 7kg machine becomes after 20 minutes work