API reference
API reference
Select your platform
No SDKs available
No versions available

AudioPauseMode Enum

Controls when audio playback is automatically paused and resumed.
Developers can override VrActivity.audioPauseMode to select the appropriate mode for their application's needs.

Signature

enum AudioPauseMode : Enum<AudioPauseMode> 

Enumeration Constants

MemberDescription
ACTIVITY_FOCUS
Audio is paused/resumed based on Android Activity lifecycle (onPause/onResume). This is the default behavior. Use this when you want audio to stop whenever the Activity goes to background, including when the system UI is shown.
OPENXR_FOCUS
Audio is paused/resumed based on OpenXR session focus state. Audio continues playing when the Activity is paused but the XR session still has focus, and pauses when the XR session loses focus (e.g., when another immersive app gains focus). Use this for immersive VR apps where you want audio to continue even when Android Activity focus is lost temporarily.
MANUAL
Audio is not automatically paused or resumed. The developer is responsible for calling Scene.setAudioEnabled manually. Use this when you need full control over audio lifecycle, for example to implement custom pause logic or to keep audio playing in specific scenarios.
Did you find this page helpful?