Search Unity

Audio Sound stops after alarm or other notification with sound is triggered over the app on iOS.

Discussion in 'Audio & Video' started by bkachmar, Aug 27, 2019.

  1. bkachmar

    bkachmar

    Joined:
    Mar 15, 2013
    Posts:
    43
    Hi guys,

    Recently I noticed that in my app the AudioSources stop working after a notification with sound triggers over the app. This can be easy reproduced by starting the app and setting up alarm or Skype call notification.

    I use AudioSource to stream audio from URL and to play AudioClip that is attached to a public variable in Editor. Both of them stop playing after the notification and there are no errors triggering.

    When after that I go to iPad main screen and then back to my app - the audio plays well again.
    So seems like Unity already knows how to reset it.
    On my side I know how to catch the event of audio interruption end, so the solution would be to run the Unity's default OnApplicationFocus code there. How to find it?

    The issue reproduces on Unity 2018.3.14f1 and Unity 2019.1.12f1.
    Does anyone else have this issue?

    P.S. I saw old forum threads with this issue, but they are stuck.
    The bug is stated as Fixed in this Issue Tracker, but it can be reproduced constantly with much newer versions of Unity:
    https://issuetracker.unity3d.com/is...-a-particular-smartphone-from-unity-5-dot-3-5