Reputation: 1
Description
I want to prevent the delay happened when onAdHidden called, or some other method which I should follow for quickly navigte through screens when ad is dismissed.
**
MAX SDK Version**
com.applovin:applovin-sdk:12.1.0
Device/Platform Info Every Android
Current Behavior Description The onAdHidden callback in the AppLovin interstitial ad implementation takes an unusually long time to trigger after the ad is dismissed. This delay impacts the user experience, as navigation or post-ad actions (e.g., moving to the next screen) are delayed until the callback is executed.
Code Snippet Here’s the relevant part of the code where the issue occurs:
mInterstitialAd?.setListener(object : MaxAdListener {
override fun onAdLoaded(ad: MaxAd) {
isInterstitialAdLoading = false
AdsManager.mInterstitialAd?.let { mInterstitialAd?.let{it1->AdBlockerHelper.setInterstitialAd(it, it1) }}
Log.e("AdsManager", "onAdLoaded")
}
override fun onAdLoadFailed(adUnitId: String, error: MaxError) {
isInterstitialAdLoading = false
Log.e("AdsManager", "onAdLoadFailed")
}
override fun onAdDisplayFailed(ad: MaxAd, error: MaxError) {
isInterstitialAdLoading = false
mInterstitialAd?.loadAd()
Log.e("AdsManager", "onAdDisplayFailed")
}
override fun onAdDisplayed(ad: MaxAd) {
hideLoading()
}
override fun onAdClicked(ad: MaxAd) {}
override fun onAdHidden(ad: MaxAd) {
Log.e("AdsManager", "onAdHidden") // This log takes too long to appear after ad dismissal
mInterstitialAd?.loadAd()
onInterstitialAdClosed?.invoke() // Call the custom function when interstitial ad is closed
}
})
Steps to Reproduce Integrate the AppLovin SDK and set up an interstitial ad.
Implement the MaxAdListener and log the onAdHidden callback.
Display the interstitial ad to the user.
Observe the time difference between when the ad is visually dismissed and when the onAdHidden callback is triggered.
Solution I need
The onAdHidden callback should trigger immediately after the ad is dismissed, allowing the app to proceed with post-ad actions (e.g., navigation) without delay.
`
Upvotes: 0
Views: 21