AppLovin / AppLovin-MAX-SDK-Android

Other
228 stars 102 forks source link

Multiple requests in console and slow fail response when loading interstitial ads #102

Closed UnateD closed 2 years ago

UnateD commented 2 years ago

Hello. I'm using Applovin Max mediation to load interstitial ads. SDK was integrated according to the instructions, I call advertising for loading through

maxInterstitialAd = new MaxInterstitialAd("my_unit_id", activity);
maxInterstitialAd.setListener(this);
maxInterstitialAd.setRevenueListener(this);
maxInterstitialAd.loadAd();

here is my MaxAdListener

    public void onAdLoaded(MaxAd ad) {
        setStatus(ProviderStatus.LOADED);
    }

    @Override
    public void onAdDisplayed(MaxAd ad) {
        setStatus(ProviderStatus.OPENED);
    }

    @Override
    public void onAdHidden(MaxAd ad) {
        setStatus(ProviderStatus.CLOSED);
    }

    @Override
    public void onAdClicked(MaxAd ad) {
        setStatus(ProviderStatus.CLICKED);
    }

    @Override
    public void onAdLoadFailed(String adUnitId, MaxError error) {
        setStatus(ProviderStatus.FAILED);
    }

    @Override
    public void onAdDisplayFailed(MaxAd ad, MaxError error) {
        setStatus(ProviderStatus.FAILED);
    }
  1. My first problem is that when I request an ad, I make a single call to the sdk, but in the MAX console I see multiple requests. Do I understand correctly that within the mediation, the SDK makes multiple requests?
  2. The second question is related to the speed of response to an advertising request. I observe a very long response, in the absence of ads. None of the fail callbacks (onAdLoadFailed, onAdDisplayFailed) are called for a long time (one to two minutes) if the sdk can't find the ad. How can I limit the response time if there is no ad? Due to the long wait, users have time to leave the application and I do not receive error statistics during ad requests

I would be grateful for comments on these issues.

thomasmso commented 2 years ago

Hello. That's correct - our SDK will make several requests internally. I would advise to not have the user experience depend on our ad load success/failure callbacks or add a timeout to how long you wait, since there will be higher latency in T3 geos.

UnateD commented 2 years ago

Good afternoon thanks! What timeout for loading ads should be added? how much time is better to allocate for loading and what is the optimal one?

can you also tell me, how many attempts does the SDK make to download advertising and with what timeout between attempts? I would like to understand, since the application also has its own retry system and, apparently, they may conflict

thomasmso commented 2 years ago

The timeout is up to you on what you believe will be optimal for your UX.

We have a maximum time of ~16 seconds from ad load to the ad load success or failure callback being called.

UnateD commented 2 years ago

thanks! this is a bit strange because we have a 30 second timeout for loading ads in our app and it works very often! it turns out that users download ads takes longer than 30 seconds and there are no download or error callbacks.

Tell me, are there any restrictions on the parallel loading of interstitials with different units in different classes? can it somehow affect the speed of receiving callbacks?

thomasmso commented 2 years ago

There are no restrictions of parallel loading inters with different Ad Units - however, the recommend best practice is to use only one Ad Unit per ad format. It won't affect callbacks either way you do it though.

UnateD commented 2 years ago

thanks! tell me, how many repeated requests does sdk make per call to the loadAd loading method?

thomasmso commented 2 years ago

A maximum of 4 times.

UnateD commented 2 years ago

Is there some kind of timeout between these 4 requests or do they follow each other without stopping?

I have one more question - in mediation max, all providers inside are sent to download ads at the same time or is there some kind of sequence?

thomasmso commented 2 years ago

We have timeouts between the requests. The sequence of ads depends on how the networks bid. Feel free to check out our site for more info on how in-app bidding works!

UnateD commented 2 years ago

Thanks for the quick and quality replies! Tell me, does Applovin have some kind of support chat for developers directly for questions like this, or is it better to ask questions here on github?

thomasmso commented 2 years ago

GitHub is fine - the rest of the community can concurrently observe the conversations and benefit from them.

UnateD commented 2 years ago

A maximum of 4 times.

@thomasmso Good day! We previously discussed that max makes multiple requests for 1 ad hit. Is it possible to disable this behavior? Can I get 1 request in the max console for loadAd() method call, instead of multiple ones? Thank you

thomasmso commented 2 years ago

@UnateD - Do you have an AM with AppLovin? Could you link me to your App Store / Play Store portfolio? This ask usually has to go through them and product team.