Search Unity

Android completely MUTE after unity ads is show

Discussion in 'Unity Ads' started by nam-duong-887, Apr 16, 2016.

  1. nam-duong-887

    nam-duong-887

    Joined:
    Dec 25, 2015
    Posts:
    7
    Hi,

    After unity ads show up, the device is completely mute. I did check AudioListener.Volume, tried to set it to 1, no luck.

    The ads always play with sound, regardless whenever I'm in test mode or production mode, but my game is completely muted no matter what.

    It does not happen on iOS.

    I looked at the logs, nothing special. I am using unity 5.4b14, can anyone help me with this?

    Thanks

    I have some logs:

    I/ActivityManager( 1083): START u0 {flg=0x10010000 cmp=com.nz.arrows.android/com.unity3d.ads.android.view.UnityAdsFullscreenActivity} from uid 10113 on display 0

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:52:55 +10:00 DEBUG: Application is pausing, which disconnects the RTMP client. Leaving room.

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    I/ActivityManager( 1083): Config changes=480 {1.0 505mcc3mnc en_US ?layoutDir sw360dp w640dp h335dp 480dpi nrml long land finger -keyb/v/h -nav/h s.9}

    V/ActivityManager( 1083): Display changed displayId=0

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    I/ActivityManager( 1083): Displayed com.nz.arrows.android/com.unity3d.ads.android.view.UnityAdsFullscreenActivity: +248ms

    V/ActivityManager( 1083): Display changed displayId=0

    I/ActivityManager( 1083): Config changes=480 {1.0 505mcc3mnc en_US ?layoutDir sw360dp w360dp h615dp 480dpi nrml long port finger -keyb/v/h -nav/h s.10}

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:53:59 +10:00 DEBUG: ReportScore: score=13, board=CgkIreShh-0aEAIQEw

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:53:59 +10:00 DEBUG: Native Submitting score: 13 for lb CgkIreShh-0aEAIQEw with metadata:

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:53:59 +10:00 DEBUG: Invoking user callback on game thread

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): Sent 13 to best_time

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:53:59 +10:00 DEBUG: ReportScore: score=0, board=CgkIreShh-0aEAIQEg

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:53:59 +10:00 DEBUG: Native Submitting score: 0 for lb CgkIreShh-0aEAIQEg with metadata:

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:53:59 +10:00 DEBUG: Invoking user callback on game thread

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    I/Unity (13293): Sent 0 to best_score

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    V/ActivityManager( 1083): Display changed displayId=0

    I/Unity (13293): [Play Games Plugin DLL] 04/16/16 19:54:04 +10:00 DEBUG: Application is pausing, which disconnects the RTMP client. Leaving room.

    I/Unity (13293):

    I/Unity (13293): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    I/Unity (13293):

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output

    W/ActivityManager( 1083): getRunningAppProcesses: caller 10113 does not hold REAL_GET_TASKS; limiting output
     
  2. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    365
    Hi,

    Do you have a mobile security software like Avast running? If so - try disabling it and see if this helps.
     
  3. anicecompany

    anicecompany

    Joined:
    Jul 29, 2015
    Posts:
    17
    I have the same problem. No security software installed. Only goes mute when it's live ads, so it's a bit tricky to test without spamming the ads.
    Unity 5.4.0b15
     
  4. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    365
  5. anicecompany

    anicecompany

    Joined:
    Jul 29, 2015
    Posts:
    17
    It's not muted ("NO"), but that's the audio for the ad? Or should the setting be "Yes"?
    The problem is that the game is muted when returning from a live video ad. Android only.
     
  6. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    365
    Ah, I misread earlier.

    I tried to reproduce by showing an ad while music was playing - the music resumed playing after the ad and the music could be restarted as well.

    Can you provide any steps to reproduce this? How have you integrated ads to your game? Are you using the Asset store package or the services window -based integration?

    There's a couple of articles about this error:
    http://stackoverflow.com/questions/32727289/activitymanager-does-not-hold-real-get-tasks-warning
    http://stackoverflow.com/questions/31948830/android-activity-manager-real-get-tasks-error

    Does it help if you change your AndroidManifest accordingly?

    Which version of Android are you running?

    Do you use notifications?

    Which additional SDKs are you using? (Google Play etc.)
     
  7. anicecompany

    anicecompany

    Joined:
    Jul 29, 2015
    Posts:
    17
    Thanks for your reply. I have tested some more and could reproduce it on certain devices.
    Create a new project with the code below. Drag some music to the inspector.
    Activate unity ads (Unity 5.4.0b15), (doesn't matter if test mode is enabled or not, so enable it).

    Nexus 4 (phone) Android version 5.1.1 - does not work
    Nexus 7 (tablet) Android version 5.1.1 - does not work
    Galaxy S6 (phone) Android 6.0.1 - does work. bug does not appear.
    Sony Xperia (phone) Android 4.4.2 - does work. bug does not appear.

    Code:

    using UnityEngine;
    using System.Collections;
    using UnityEngine.Advertisements;

    public class Test : MonoBehaviour {

    public AudioClip bgm;
    private AudioSource BGMAudio;

    // Use this for initialization
    void Start () {
    BGMAudio = gameObject.AddComponent<AudioSource>();
    BGMAudio.clip = bgm;
    BGMAudio.Play();
    Invoke("ShowAd",3);
    }

    public void ShowAd() {
    Advertisement.Show();
    }
    }
     
  8. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    132
    It fails to me too using Unity 5.3.5. No sound after ad played, but it happens to me with other networks like Vungle. So I guess something about the resuming android activity is not working well.
     
  9. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    132
    I tested on Nexus 5 phone with Android 5.1 and it works.
    I've tested on a Bq Edison 3 3G with Android 5.0.2 and it fails.
    I've tested on a Nexus 7 with Android 5.1.1 and it fails.
    Please take this bug in care.
    It is a bug. In our case there was no any new line of code developed since the 5.3.5 update. So the same project was upgraded from 5.3.4p6 to 5.3.5 and we did an apk built. And this is the result.
     
  10. brayang

    brayang

    Joined:
    Jan 4, 2016
    Posts:
    4
    I use unity 5.3.5 and it has the same error , please fix it Unity Technologies
     
  11. SajBear

    SajBear

    Joined:
    Mar 17, 2015
    Posts:
    8
    I have this problem too on my Nexus 7.
    Changing scenes does not help either.

    Edit: I use unity 5.3.5f1 personal
     
  12. anicecompany

    anicecompany

    Joined:
    Jul 29, 2015
    Posts:
    17
  13. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    132
    Is this issue will be fixed thru a patch in next days? I guess 5.3.6 will take some time to be released.
     
  14. jessej-jdj

    jessej-jdj

    Joined:
    Jul 18, 2015
    Posts:
    1
    I'm also experiencing this problem with a Nexus 7. I'm using Unity 5.3.5f1
     
  15. NovaSurfer

    NovaSurfer

    Joined:
    May 18, 2014
    Posts:
    11
    This problem is present in the Unity 5.4.0B19 build, and I am very disappointed. I have a Nexus 10 with Android 5.1.1. The most offensive that it was found just before the release, now I think about switching to Admob. You can not fix this bug for more than a month, given the fact that this component of Unity3D that brings you money.
     
  16. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,169
    Hi. We are keeping an eye out for this, and will let you know when it has been fixed i Unity 5.3 and 5.4 versions. Thanks for your input on this.

    -Rasmus
     
  17. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Same problem here.
    Just happened using a Singleton as MusicManager on Unity 5.3.5f1
    After a videorewarded sound as muted.
     
  18. archoliver

    archoliver

    Joined:
    Jul 4, 2014
    Posts:
    5
    Same here. Please help!
     
  19. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    341
    Lots of my players have been reporting this too, i could never reproduce it on my test devices though.
    Happy to hear its not just my game/my players. ^_^
    it did not used to do this, so its either happened with recent Android SDK updates or the last latest 2/3 Unity 5 patches.
    Unity Ads version is same for a few months now so can't be that. Nothing else has changed in my project either that would cause it.
     
  20. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Well, i can skip this "bug" restoring audio:
    AudioListener.volume = 1f;
    Do this when video is finished, skipped or failed.
    Kind regards.
     
  21. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    341
    Good idea, i will add that temp fix into the next update ;)
     
  22. anicecompany

    anicecompany

    Joined:
    Jul 29, 2015
    Posts:
    17
    Doesn't work for me (Unity 5.4.0b19). One solution that does work is to disable unity ads for android projects until it's fixed:(
     
  23. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,169
    Just a quick followup. The issue has been fixed internally in a branch, however not in any public release yet. Will follow up here when it's available.

    /Rasmus
     
  24. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    341
    Nice work ;)
    I presume it will appear in the improvements/fixes patch notes on the site?
     
  25. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Just today new release but still buged.
    >.<
     
  26. brayang

    brayang

    Joined:
    Jan 4, 2016
    Posts:
    4
    new Patch but still bug:(
     
  27. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    341
    According to Rasmus its fixed, but sounds like it will be in a different future patch, just missed this one by the looks of it ^_^
     
  28. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    new patch, downloading and testing

    -----edit
    Works!
    I¨ts fixed!
     
    Last edited: Jun 16, 2016
    rasmus-unity and jesusluvsyooh like this.
  29. NovaSurfer

    NovaSurfer

    Joined:
    May 18, 2014
    Posts:
    11
    Patch 5.3.5p4 fix that, thanks a lot
     
    kk99 likes this.
  30. anicecompany

    anicecompany

    Joined:
    Jul 29, 2015
    Posts:
    17
    Any patch for 5.4.x?
     
  31. kk99

    kk99

    Joined:
    Nov 5, 2013
    Posts:
    77
    @NovaSurfer


    Thank you for the Advice. Patch 5.3.5p4 solved it for me too.


    @Unity FYI
    5.3.1f1 (no problems with Audio)
    5.3.4f1 (problems with Audio on certain devices)




     
  32. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,169
    Thanks for info. I'm following up with the Android team to figure out when this goes into trunk/5.4.
     
  33. LeekingWeng

    LeekingWeng

    Joined:
    Dec 3, 2014
    Posts:
    1
    Installed 5.3.5p4 and build for android.But problems still exist.
    Installed 5.3.4p4 and build for android. No problem.

    Build:
    IL2cpp
    Device:
    Samsung galaxy s6 edge+
     
    IndieFist likes this.
  34. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    I have tested again.
    No mute when watch an ad, but yes if you get some notify from mail, skype or wathsapp...
     
  35. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Updated all Android SDK Manager, every time you get some notification you get MUTE on your game.
     
  36. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,008
    Hmm, i'm having this issue too.
     
  37. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Well, i want to share more information.
    I`m using unity 5.3.4 and get also muted every time i get some notification.
    Using OSX El Capitan, 10.11.4
    Updated all SDK.
    --
    Just updated to latest version 5.3.5.p5, still buged.
    Mute game on any notify received.
    Apologize about my english :p
     
    Last edited: Jun 23, 2016
  38. sieon0

    sieon0

    Joined:
    Mar 26, 2014
    Posts:
    1
    I have also had the same problem.
    (Any Notification -> Mute Game)

    no problem in 5.3.2p2.

    Version up to 5.3.4p6, has problem occurs.
     
    Last edited: Jun 24, 2016
  39. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,169
    Should have been fixed now in 5.4.0b23 as well (at least I couldn't reproduce it on a Samsung Galaxy)

    From https://unity3d.com/unity/beta release notes for b23:
    "[796242] Android: Fixed an issue where games would not start playing audio again when Audio focus was lost."

    Please let us know if this is not the case
     
  40. Jakub-Milik

    Jakub-Milik

    Joined:
    Oct 8, 2013
    Posts:
    3
    Still having the issue

    Tested with :
    Unity 5.4.0b23
    Samsung Galaxy Tab 3 t211
    Android 4.4.2

    When ingame sound mutes after recieving system notification and does not resume
     
    IndieFist likes this.
  41. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Well, there is alot of games right now on play.google.com with this bug, all the latest published and using unity latest version.
    Apologize about my english.
    I have used this version, because the version 5.3.2p2 with no problem about MUTE when focus was lost has the problem about start particles again when disable it.
    edit.
    I want to tell you, if you got sound for multimedia on, and sound for notifications off, you dont loss audio on notification received.
     
  42. DuongThuy

    DuongThuy

    Joined:
    Jun 28, 2016
    Posts:
    15
  43. kujo

    kujo

    Joined:
    Aug 19, 2013
    Posts:
    106
    updating to 5.3.5p7 fixed this for me. I had the same issue.
     
    IndieFist likes this.
  44. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    314
    Finally fixed.
    Congratulations.
     
  45. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Try using up-to-date version: 5.4.0 or at least 5.3.6.
     
    andrew_2992 and Aetther like this.
  46. Surreal

    Surreal

    Joined:
    Dec 10, 2011
    Posts:
    20
    We're experiencing this same issue
     
  47. khuramsaddique

    khuramsaddique

    Joined:
    Jul 23, 2014
    Posts:
    1
    I have upgraded my project from Unity 5.3.5 to unity 5.6.1f1 and issue is solved .
     
  48. andrew_2992

    andrew_2992

    Joined:
    Jun 27, 2015
    Posts:
    6
    Anyone know of a patch fix that will fix this? I have Unity 5.3.5f1 installed and am hesitant to update to the newest version of unity because I'm very close to a release with my game and went through hell trying to get it working(I made a previous game in 5.3.5f1 over the course of a couple years and when I started making the sequel to it on a newer version I had a lot of problems).

    My only issue is this problem of no sound after ads. I was initially shocked when I had no sound after ads. I discovered that it was due to the ad displaying after I turned off my wifi and played the game. It loads with sound if the ad never opens.