RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.81k stars 405 forks source link

Trying to use scheduled timer with camera #335

Closed RowanG1 closed 5 years ago

RowanG1 commented 5 years ago

The fotoapparat works well for once off snapped images. If I use the fotoapparat in a timer, to snap images every 1 second, it causes problems- very sluggish.

RowanG1 commented 5 years ago

problem solved: var runnable: Runnable = Runnable { takePhotoAndDoTask { //your completion handler startTimer() }

    }
}

fun startTimer() {
    handler.postDelayed(runnable, 2000)
}