/**@class android.media.AudioPlaybackCaptureConfiguration @extends java.lang.Object Configuration for capturing audio played by other apps. When capturing audio signals played by other apps (and yours), you will only capture a mix of the audio signals played by players (such as AudioTrack or MediaPlayer) which present the following characteristics: <ul> <li> the usage value MUST be {@link android.media.AudioAttributes#USAGE_UNKNOWN} or {@link android.media.AudioAttributes#USAGE_GAME} or {@link android.media.AudioAttributes#USAGE_MEDIA}. All other usages CAN NOT be captured. </li> <li> AND the capture policy set by their app (with {@link android.media.AudioManager#setAllowedCapturePolicy}) or on each player (with {@link android.media.AudioAttributes.Builder#setAllowedCapturePolicy}) is {@link android.media.AudioAttributes#ALLOW_CAPTURE_BY_ALL}, whichever is the most strict. </li> <li> AND their app attribute allowAudioPlaybackCapture in their manifest MUST either be: <ul> <li> set to "true" </li> <li> not set, and their {@code targetSdkVersion} MUST be equal to or greater than {@link android.os.Build.VERSION_CODES#Q}. Ie. Apps that do not target at least Android Q must explicitly opt-in to be captured by a MediaProjection. </li></ul> <li> AND their apps MUST be in the same user profile as your app (eg work profile cannot capture user profile apps and vice-versa). </li> </ul> <p>An example for creating a capture configuration for capturing all media playback: <pre> MediaProjection mediaProjection; // Retrieve a audio capable projection from the MediaProjectionManager AudioPlaybackCaptureConfiguration config = new AudioPlaybackCaptureConfiguration.Builder(mediaProjection) .addMatchingUsage(AudioAttributes.USAGE_MEDIA) .build(); AudioRecord record = new AudioRecord.Builder() .setAudioPlaybackCaptureConfig(config) .build(); </pre> @see Builder @see android.media.projection.MediaProjectionManager#getMediaProjection(int, Intent) @see AudioRecord.Builder#setAudioPlaybackCaptureConfig(AudioPlaybackCaptureConfiguration) */ var AudioPlaybackCaptureConfiguration = { /** @return {Object {android.media.projection.MediaProjection}} the {@code MediaProjection} used to build this object. @see Builder#Builder(MediaProjection) */ getMediaProjection : function( ) {}, /** @return {Number} the usages passed to {@link Builder#addMatchingUsage(int)}. */ getMatchingUsages : function( ) {}, /** @return {Number} the UIDs passed to {@link Builder#addMatchingUid(int)}. */ getMatchingUids : function( ) {}, /** @return {Number} the usages passed to {@link Builder#excludeUsage(int)}. */ getExcludeUsages : function( ) {}, /** @return {Number} the UIDs passed to {@link Builder#excludeUid(int)}. */ getExcludeUids : function( ) {}, };