Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.25 KB

README.md

File metadata and controls

30 lines (25 loc) · 1.25 KB

TFAudioRecord

TestFairy audio recording sample project.

How to include in a project

  1. Copy TestFairyAudioRecord.java to your project.
  2. Add TestFairy SDK to your project.
  3. Put the line below right next to TestFairy.begin(context, token).
 TestFairyAudioRecord.begin(context);
  1. Put the lines below in your main activity.
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    TestFairyAudioRecord.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
  1. Profit!

Sample Project

You can see an example usage in Draw Me A Fairy project and its corresponding audio product flavor.

Extra Utilities

  • Use TestFairyAudioRecorder.setAudioSampleListener() to capture each recorder audio sample. Given listeners will run in main thread.
  • Use TestFairyAudioRecorder.mute() to pause recordings. Use TestFairyAudioRecorder.unmute() to resume.

License

Apache License 2.0