AudioManager.AllowedCapturePolicy Property

Definition

Return the capture policy. -or- Specifies whether the audio played by this app may or may not be captured by other apps or the system.

public virtual Android.Media.CapturePolicies AllowedCapturePolicy { [Android.Runtime.Register("getAllowedCapturePolicy", "()I", "GetGetAllowedCapturePolicyHandler", ApiSince=29)] get; [Android.Runtime.Register("setAllowedCapturePolicy", "(I)V", "GetSetAllowedCapturePolicy_IHandler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("getAllowedCapturePolicy", "()I", "GetGetAllowedCapturePolicyHandler", ApiSince=29)>]
[<set: Android.Runtime.Register("setAllowedCapturePolicy", "(I)V", "GetSetAllowedCapturePolicy_IHandler", ApiSince=29)>]
member this.AllowedCapturePolicy : Android.Media.CapturePolicies with get, set

Property Value

the capture policy set by #setAllowedCapturePolicy(int) or the default if it was not called.

Attributes

Remarks

Property getter documentation:

Return the capture policy.

Java documentation for android.media.AudioManager.getAllowedCapturePolicy().

Property setter documentation:

Specifies whether the audio played by this app may or may not be captured by other apps or the system.

The default is AudioAttributes#ALLOW_CAPTURE_BY_ALL.

There are multiple ways to set this policy: <ul> <li> for each track independently, see AudioAttributes.Builder#setAllowedCapturePolicy(int)</li> <li> application-wide at runtime, with this method </li> <li> application-wide at build time, see allowAudioPlaybackCapture in the application manifest. </li> </ul> The most restrictive policy is always applied.

See AudioPlaybackCaptureConfiguration for more details on which audio signals can be captured.

Java documentation for android.media.AudioManager.setAllowedCapturePolicy(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to