One clear focus for Google in Android Q has been protecting privacy and improving how the OS handles permissions. In a post for developers today, Google explains how Android Q handles capturing audio.

The best gifts for Android users

A new API in Android Q, the AudioPlaybackCapture API, makes it a bit easier for apps to capture the audio produced by other applications and the system in general. Google uses the Live Caption feature as one example of where this API would be used, as it listens to the audio content to translate it in real-time. Another use case Google sees for this is apps that can access game audio for recordings or streaming.

When this API is used, Android Q asks the user for permission before it captures audio. A prompt appears when the app first asks for this permission, and a second prompt appears before each session to warn the user that this allows the app being used to see and record potentially sensitive information. After hitting “start now” to record audio in Android Q, the cast icon appears in the status bar with a red filling to indicate recording.

App developers targeting API version 28 and below need to explicitly opt-in to allowing other third-party apps to record their audio, but API version 29 has some exceptions. For apps with usage types for “media” or “game,” other apps can record this by default. System apps/components, however, can record by default on “media” or “game” usage types on either API level. Developers do have the option to disable the functionality too which Google further details in its post.

Android Q contains a new AudioPlaybackCapture API. This API gives apps the ability to copy the audio being played by other apps. This feature is the analog of screen capture, but for audio. The primary use case is for streaming apps that want to capture the audio being played by games. Note that the capture API does not affect the latency of the app whose audio is being captured.

More on Android Q:


Check out 9to5Google on YouTube for more news:

About the Author