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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    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:
    10
    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:
    9
    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:
     
  6. a4anas4a

    a4anas4a

    Joined:
    Jun 12, 2020
    Posts:
    1
    Please, nothing yet ????