-1

I am doing r&d on a voice recording app. I have created a normal voice recording application. In which if I click on record it starts recording and after clicks on stop it stores the file. This is a normal voice recorder app feature.

But in my app, I am trying to record the voice in every 5 seconds means if I start the recording then after 5 secs automatically one record file will be store then like that after 5-10 sec another file will be store then the same process will carry unless and until I stop the recording button. For example, if I record one file length of 30 seconds then it should store 6 files. I really don't have any idea how to do it, I just want some suggestions to do this.

1 Answers1

0
   Timer timer = new Timer();
    timer.schedule(new TimerTask() {
        @Override
        public void run() {
            getActivity().runOnUiThread(runnable);
        }
    }, 0, 5000);
PRATEEK BHARDWAJ
  • 2,364
  • 2
  • 21
  • 35
rupali mittal
  • 195
  • 1
  • 8