Try this (working for me in companion on Android 13)
You will need to use tinydb to store the savedRecordings before closing/restarting the app.