Well after move testing I found out that changing this:
this.mediaRecorder.setAudioSource(
android.media.MediaRecorder.AudioSource.MIC
);
to this:
this.mediaRecorder.setAudioSource(
android.media.MediaRecorder.AudioSource.VOICE_COMMUNICATION
);
solves my problem. I get 32762 max amplitude in every device I tried it on.
- Edit: This worked perfectly when using the AMR_NB AudioEncoder, when I switched to AAC it started to output 9000 as the max amplitude again. The solution was to change the audio source to VOICE_RECOGNITION