Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Music playing while app not in foreground

Discussion in 'iOS and tvOS' started by akasurreal, Apr 5, 2014.

  1. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    441
    I know iOS supports playing music and recording while an app is in the background using UIBackgroundModes, but has anyone gotten this to work with a Unity app? Possible?

    Thanks!
     
  2. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    441
    And same question for Android, bump
     
  3. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  4. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    441
  5. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    441
    Using what was mentioned in the other thread and subclassing UIApplication as shown here:
    https://github.com/MosheBerman/ios-audio-remote-control

    I was finally able to get background audio and respond to the Play/Pause events in iOS6/7. Sounds like this is completely different process for Android, so I will put that off for now.