‘Apps in Android P can’t use the microphone in the background’
The next version of Android will not allow apps running in the background to use the microphone. Earlier, a commit showed that using the camera is not allowed in Android P when apps are running in the background.
The code change from the Android Open Source Project was noticed by XDA Developers. This shows that from the next version, apps that are idle will no longer be able to use the microphone. As with blocking the camera, Google probably wants to prevent abuse with this.
In current situations, apps can theoretically record sound even if they run in the background, without the user noticing. This is possible after apps have been given permission to use the microphone. The new Android version will check whether an app is active and if it is not, no data will be written, but a string of zeros. When the app becomes active again, the sound data will be saved normally.
The limitation is probably in the next version of Android, which will probably first be referred to as Android P. In recent years, Google released a first developer preview of a new Android version in March.