Relative Content

Tag Archive for kotlin

Kotlin Android having problems recording videos of 1 minute chunks

private fun startVideoRecordingProcess() { Log.d(“TestInterfaceActivity”, “Starting video recording process”) videoHandlerThread = HandlerThread(“VideoBackground”).also { it.start() } videoHandler = Handler(videoHandlerThread.looper) Timer().schedule(object : TimerTask() { override fun run() { recordVideoInBackground() } }, 0, 60000) // Record every 60 seconds } private fun recordVideoInBackground() { Log.d(“TestInterfaceActivity”, “Recording video in background”) setupMediaRecorder() videoFile = File(getExternalFilesDir(null), “video_${System.currentTimeMillis()}.mp4”) mediaRecorder?.apply { setOutputFile(videoFile?.absolutePath) prepare() […]

Kotlin Android having problems recording videos of 1 minute chunks

private fun startVideoRecordingProcess() { Log.d(“TestInterfaceActivity”, “Starting video recording process”) videoHandlerThread = HandlerThread(“VideoBackground”).also { it.start() } videoHandler = Handler(videoHandlerThread.looper) Timer().schedule(object : TimerTask() { override fun run() { recordVideoInBackground() } }, 0, 60000) // Record every 60 seconds } private fun recordVideoInBackground() { Log.d(“TestInterfaceActivity”, “Recording video in background”) setupMediaRecorder() videoFile = File(getExternalFilesDir(null), “video_${System.currentTimeMillis()}.mp4”) mediaRecorder?.apply { setOutputFile(videoFile?.absolutePath) prepare() […]

Kotlin Android having problems recording videos of 1 minute chunks

private fun startVideoRecordingProcess() { Log.d(“TestInterfaceActivity”, “Starting video recording process”) videoHandlerThread = HandlerThread(“VideoBackground”).also { it.start() } videoHandler = Handler(videoHandlerThread.looper) Timer().schedule(object : TimerTask() { override fun run() { recordVideoInBackground() } }, 0, 60000) // Record every 60 seconds } private fun recordVideoInBackground() { Log.d(“TestInterfaceActivity”, “Recording video in background”) setupMediaRecorder() videoFile = File(getExternalFilesDir(null), “video_${System.currentTimeMillis()}.mp4”) mediaRecorder?.apply { setOutputFile(videoFile?.absolutePath) prepare() […]