App works different in android than VS

i am working on a sound level meter application, it works correctly in Visual Studio, but when I build the application, the measurement module does not work as it should. The measurement module should measure with time weighting in intervals of 1 second, in visual studio it does it perfectly, but in android what it does is load itself with 100dB every second until it reaches 4 seconds where it goes to NaN.

i dont know why is that happening