Skip to content

testfairy-blog/TFAudioRecord

Repository files navigation

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

About

TestFairy audio recording sample project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages