Pause & Resume with Android MediaRecorder (API level < 24)

I could solve this problem using mp4parser library. Thanks much to author of this library 🙂 Add below dependency in your gradle file: compile ‘com.googlecode.mp4parser:isoparser:1.0.2’ The solution is to stop recorder when user pause and start again on resume as already mentioned in many other answers in stackoverflow. Store all the audio/video files generated in … Read more

Add a delay after executing each iteration with forEach loop

What you want to achieve is totally possible with Array#forEach — although in a different way you might think of it. You can not do a thing like this: var array = [‘some’, ‘array’, ‘containing’, ‘words’]; array.forEach(function (el) { console.log(el); wait(1000); // wait 1000 milliseconds }); console.log(‘Loop finished.’); … and get the output: some array … Read more