HTML5+android获取麦克风是否被占用
checkAudioRecordState(){
let available = false;
plus.android.requestPermissions(['android.permission.RECORD_AUDIO'], function(e){
}, function(e){
console.log('Request Permissions error:'+JSON.stringify(e));
});
let AudioRecord = plus.android.importClass("android.media.AudioRecord");
let record = new AudioRecord(1,44100,16,1,44100);
record.startRecording();
let recordingState = record.getRecordingState();
if(1 === recordingState){
available = true;
}
record.release();
return available;
},