Android : how to know my app's AudioRecord permission is disallowed or not

on Wednesday, September 3, 2014


I have a problem now . My app's microphone permission was disallowed by user. So I try to solve like this :



if (audio_recorder.getRecordingState() != AudioRecord.RECORDSTATE_RECORDING) {
//toast("the audio record permission was disallowed");
return;
}


The problem is that some android os devices run this code but audio_recorder.getRecordingState() always returns AudioRecord.RECORDSTATE_RECORDING. Who can help me ? Are there other ways ?


0 comments:

Post a Comment