Thanks for your response. Based on your suggestion I have implemented Background Video Recording using LifecycleService. Also tested in MotoG9 Power Android 11 device and One Plus Nord CE3 Android 13 device, it works fine. But the file size is too big like 02 min 56 secs video size is 134 MB in 320x240 camera resolution. To avoid this large single file scenario I would like to split the video recording in multiple .mp4 files instead of a single .mp4 file.
I have used CountDownTimer class to automatically start & stop the video recording. To auto stop the Video recording automatically I have implemented videoCapture.stopRecording(); and it works fine, recording stopped & file is getting saved properly but the video recording not again getting starting automatically.
Can you please help me out on this..