How to change Mic source in TensorAudio?

I have used Tensorflow sample for audio classification.

AudioClassifier classifier = AudioClassifier.createFromFile(this, MODEL_FILE);
TensorAudio audioTensor = classifier.createInputTensorAudio();
AudioRecord record = classifier.createAudioRecord();

However, it seem recorder always picking the default Android Phones Mic even when I am connected with Bluetooth Mic (Earbud). Is there any way to let TensorAudio know the interesting mic source?


AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
AudioDeviceInfo[] audioDevices = audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS);
AudioDeviceInfo bluetoothMic = null;
for (AudioDeviceInfo device : audioDevices) {
	if (device.getType() == AudioDeviceInfo.TYPE_BLUETOOTH_SCO) {
		bluetoothMic = device;

I got a way around and used the above code but in that case, classification does not work. No class detected. When I skip setPreferredDevice (default mic), it works fine. What is the reason?