Search Unity

Unity Ads taking Audio Focus

Discussion in 'Unity Ads & User Acquisition' started by ulfw, Jun 15, 2018.

  1. ulfw

    ulfw

    Joined:
    Mar 11, 2015
    Posts:
    2
    Hello! This is a crosspost from the Android forum (https://forum.unity.com/threads/unity-ads-taking-audio-focus.536065/), but I thought this might be a better place to ask it.

    I want to be able to listen to Spotify or a podcast while playing my game. It works until an Ad is played, which will pause Spotify (even if the ad is muted). This is acceptable, but Spotify is not resumed after the Ad is finished. Is there a way to solve this?

    I beleive that the game takes audio focus when playing an ad, and then doesn't return it. There is an Android call: abandonAudioFocus, but it requires an argument, the listener that was used while requesting the Audio Focus, and I don't know how to get hold of this.

    The user experience now is horrible: After an Ad, player has to exit the game, resume spotify, and back to the game. I would love to get a solution to this. Any ideas?

    Thanks!