Call recording – make it work on Nexus 5X (rooting or custom ROM possible)

Not sure if it is a Nexus 5 specific issue but usually the class used to record calls is MediaRecorder. Have you tried to replace AudioRecorder by a MediaRecorder? Based on this stack-overflow question, I think you could try the following code based on Ben blog post: import android.media.MediaRecorder; import android.os.Environment; import java.io.File; import java.io.IOException; … Read more

Android AudioRecord Supported Sampling Rates

The original poster has probably long since moved on, but I’ll post this in case anyone else finds this question. Unfortunately, in my experience, each device can support different sample rates. The only sure way of knowing what sample rates a device supports is to test them individually by checking the result of AudioRecord.getMinBufferSize() is … Read more

AudioRecord object not initializing

The trick with using AudioRecord is that each device may have different initialization settings, so you will have to create a method that loops over all possible combinations of bit rates, encoding, etc. private static int[] mSampleRates = new int[] { 8000, 11025, 22050, 44100 }; public AudioRecord findAudioRecord() { for (int rate : mSampleRates) … Read more

tech