TestFairy audio recording sample project.
- Copy TestFairyAudioRecord.java to your project.
- Add TestFairy SDK to your project.
- Put the line below right next to
TestFairy.begin(context, token)
.
TestFairyAudioRecord.begin(context);
- 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);
}
- Profit!
You can see an example usage in Draw Me A Fairy project and its corresponding audio
product flavor.
- Use
TestFairyAudioRecorder.setAudioSampleListener()
to capture each recorder audio sample. Given listeners will run in main thread. - Use
TestFairyAudioRecorder.mute()
to pause recordings. UseTestFairyAudioRecorder.unmute()
to resume.
Apache License 2.0