diff --git a/Assets/AirConsole/scripts/Runtime/Plugin/Android/PluginManager.cs b/Assets/AirConsole/scripts/Runtime/Plugin/Android/PluginManager.cs index 76913c6..f8357dd 100644 --- a/Assets/AirConsole/scripts/Runtime/Plugin/Android/PluginManager.cs +++ b/Assets/AirConsole/scripts/Runtime/Plugin/Android/PluginManager.cs @@ -56,6 +56,11 @@ internal PluginManager(AirConsole airConsole) { onAudioFocusChangeCallback); _airConsole = airConsole; + if (!_airConsole.IsAutomotive()) { + _airConsole.UnityPause += AbandonAudioFocus; + _airConsole.UnityResume += ResumeAudioFocus; + } + _airConsole.UnityDestroy += OnDestroy; AirConsoleLogger.LogDevelopment(() => $"{nameof(PluginManager)} created."); @@ -67,6 +72,8 @@ internal void ReportPlatformReady() { _service.Call("reportPlatformReady"); } + private void ResumeAudioFocus() => RequestAudioFocus(); + internal bool RequestAudioFocus() { AirConsoleLogger.LogDevelopment(() => "RequestAudioFocus called."); return _service.Call("requestAudioFocus"); @@ -101,6 +108,8 @@ internal void InitializeOfflineCheck() { } private void OnDestroy() { + _airConsole.UnityPause -= AbandonAudioFocus; + _airConsole.UnityResume -= ResumeAudioFocus; _airConsole.UnityDestroy -= OnDestroy; AirConsoleLogger.LogDevelopment(() => "OnDestroy called."); diff --git a/CHANGELOG.md b/CHANGELOG.md index 113a475..db7d380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ This includes security related updates like requiring fixed Unity versions and i ### Changed -- **Android Support**: Better dependency handling through gradle processor integration. Removal of included files where possible. +- **Android Support**: Better dependency handling through Gradle processor integration. Removal of included files where possible. - **Android Target SDK:** Increased to 35 to meet Google Play requirements per Nov 1, 2025. - **Unity Minimum Versions:** The Unity minimum versions have been updated to match `CVE-2025-59489` fix versions. - **Code Style**: Examples and scripts have been aligned on style. @@ -261,4 +261,4 @@ Gameplay rounds are controlled through AirConsole's setActivePlayers API. ### Deprecated - Support for i386 OSX bundle -- The webview no longer supports rendering on OSX. +- The webview no longer supports rendering on OSX. \ No newline at end of file