Use Microphone when in Background

80 views
Skip to first unread message

Alexandre Nunes

unread,
Mar 19, 2021, 2:37:44 PM3/19/21
to DroidScript
Hi!

I'm developing an App that needs to read dBs from the microphone in real-time (When the app is open) to detect sound peak's, but when I lock the screen or I pass the application to the background the dBs value is always 0.

I Know that is a secirity way to prevent capture user sound when in background but my application has a persistent notification to indicate that the application is using microphone.

Have an way to continue caputiring sound when in the screen is off?
I need one permission?

How to make like Skype or Whatsapp call when in background continue capturing sound?

My device is a xiaomi mi 9
with Android 10

Thank you

Alexandre Nunes

unread,
Mar 19, 2021, 7:50:01 PM3/19/21
to DroidScript
I Solved, in SetSource() is used SetSource("Voicecommunication");
Reply all
Reply to author
Forward
0 new messages