Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Audio Keep music playing when android app is on background

Discussion in 'Audio & Video' started by jordano00, Nov 24, 2018.

  1. jordano00

    jordano00

    Joined:
    Jul 3, 2016
    Posts:
    9
    Hello guys,
    I've looked over some posts about how to keep audio/music playing when android app is running in background but it doesn't work or that there are less cuz mainly they are for editor.

    What I want to achieve is, when the player exits the game(hits the home button) the music still plays. (the game is still running in the background)

    I tried application.runInBackground but it stops the music.
    I tried audioListener.pause = false, but the music still stops.
     
  2. DrMarvellous

    DrMarvellous

    Joined:
    Feb 5, 2019
    Posts:
    10
    Hi @jordano00, did you ever find a solution for this? I'm having the same difficulty with a music player stopping in an iOS build and have tried various code snippets I've found, but no success yet.
     
  3. yewol

    yewol

    Joined:
    Aug 2, 2018
    Posts:
    6
    Hi guys @DrMarvellous , did you find something?
    That would be awesome for iOS & Android
     
  4. adjessica

    adjessica

    Joined:
    May 17, 2020
    Posts:
    2
    Clear Your Background Processing
     
  5. Pezus

    Pezus

    Joined:
    Jan 17, 2017
    Posts:
    1
    Anyone found any solution for this as I'm planning to make a music player.
    @adjessica , what do you mean by:
     
unityunity