How to use SoundSensor and NXTSoundSensor?

Hello all,

I tried to use NxtSoundSensor and SoundSensor but both seems not working.

I have already given RECORD_AUDIO permission and app is recording audio but the Sensors doesn’t return any value. It always shows 0 for SoundSensor and -1 for NxtSoundSensor.

Can anyone help?