Closed Shchvova closed 1 year ago
Also interesting in that issue, any updates there?
Facing exactly the same issue here.
After the ad is closed, I get the following error log:
"[avas] AVAudioSession_iOS.mm:1243 Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session."
The app doesn't play any sound anymore unless you send the app to the background and switch back to it.
[EDIT] Just found a quick workaround to avoid this issue that worked for me.
Before showing an ad, change the AvAudioSession category to AVAudioSessionCategoryAmbient.
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
[self.ad showAd];
After the ad is complete, use the didHideAd() delegate method to change the AvAudioSession category back to the original value. I'm using AVAudioSessionCategoryPlayback.
- (void)didHideAd:(MAAd *)ad
{
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
}
Facing exactly the same issue here.
After the ad is closed, I get the following error log:
"[avas] AVAudioSession_iOS.mm:1243 Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session."
The app doesn't play any sound anymore unless you send the app to the background and switch back to it.
[EDIT] Just found a quick workaround to avoid this issue that worked for me.
Before showing an ad, change the AvAudioSession category to AVAudioSessionCategoryAmbient.
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; [self.ad showAd];
After the ad is complete, use the didHideAd() delegate method to change the AvAudioSession category back to the original value. I'm using AVAudioSessionCategoryPlayback.
- (void)didHideAd:(MAAd *)ad { [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; }
Thank you! I've been searching this for over a month. I use ironsource mediation with applovin so it was hard to know. Finally someone figured out the actual problem.
For me this seems to be an issue with Webview, that it loses the audio every time an ad activity is shown. The audio for the webview will then be permanently off when the ad is dismissed.
If you minimize the app and then reopen it the audio is back.
I do not have the same issue with the mediated Pangle ads, only Applovin ads. (And only real ads. The test ads always work perfectly fine..)
We released AppLovin SDK v11.6.1 with a fix for the issue. You can enable the fix using the steps in these docs after upgrading to this version. @Shchvova @Keane81 @ryanbalieiro @cihadturhan @fredriksthlm
@NanaAmoah thank you for this. I have discussed this with Thomas a bit during the last weeks. Will you document this "fix" in your official documentation (iOS, Unity, Cordova) anywhere?
Can you show exactly how the code is supposed to be implemented within this file: https://github.com/AppLovin/AppLovin-MAX-Cordova/blob/master/plugin/src/ios/AppLovinMAX.m
Since we cannot verify in the log, or anywhere else, if we actually managed to set it correctly?
@NanaAmoah still have this problem, i'm using 11.8.0,
@NanaAmoah after using MaxSdk.SetExtraParameter("return_audio_focus", "true"); The frequency of game mute has decreased,but still has this problem
@keasukei Yes this is still an issue for everyone. You can follow it here: https://github.com/AppLovin/AppLovin-MAX-SDK-iOS/issues/187
After playing interstitial or rewarded app audio session is broken in the app, unable to make sounds.