Skip to content

Implementation of the missing feature in Android SDK: audio recorder with a pause.

License

Notifications You must be signed in to change notification settings

lassana/continuous-audiorecorder

Repository files navigation

Continuous audiorecorder Download

Implementation of the missing feature in Android SDK: audio recorder with a pause. Based on mp4parser.

Import

Grab the latest version from Bintray:

repositories {
    jcenter()
}
dependencies {
    compile "com.googlecode.mp4parser:isoparser:1.0.2"
    compile "com.github.lassana:continuous-audiorecorder:1.3.2"
}

or just copy the recorder module into your project and add a new dependency:

dependencies {
    compile project(':recorder')
}

Usage

Start recording:

AudioRecorder recorder = AudioRecorderBuilder.with(context)
                                             .fileName(filename)
                                             .config(AudioRecorder.MediaRecorderConfig.DEFAULT)
                                             .loggable()
                                             .build();

recorder.start(new AudioRecorder.OnStartListener() {
    @Override
    public void onStarted() {
        // started
    }

    @Override
    public void onException(Exception e) {
        // error
    }
});

Pause:

mAudioRecorder.pause(new AudioRecorder.OnPauseListener() {
    @Override
    public void onPaused(String activeRecordFileName) {
        // paused
    }

    @Override
    public void onException(Exception e) {
        // error
    }
});

The start() method continues existing record also.

This project is licensed under the FreeBSD License.

About

Implementation of the missing feature in Android SDK: audio recorder with a pause.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •