How to refresh ads from the same provider

Sep 11, 2012 at 12:02 AM

Hi, some days ago I wrote on this post: 

http://darkgenesis.zenithmoon.com/adrotator-release-for-xna/

about not being able to get new Ads, thanks for the response by the way.

I was suggested to use the Invalidate function, problem is I'm still not getting a new ad when calling that function , the thing is I can only use Inneractive as my ad provider, so I have it on 100% probability.

As far as I've tested the invalidate function displays a different Ad but only if there is another ad provider, and even in that case next time I call Invalidate I would get the first ad by Inneractive, then the second one, then again the first one and so on.

Is there a way to fetch a new ad from the same provider??

Coordinator
Sep 11, 2012 at 8:05 AM

Hmm, curious.

When you call invalidate, AdRotator disposes of the old ad and then instantiates a new provider and retrieves a new ad.  If you are using just one ad provider the process is the same, we don't retain the old ad.

So if you are getting the same Ad again after calling invalidate, then the provider hasn't served you a different ad.

I'd suggest signing up with AdDuplex or create your own house Ad if you want to mix things up.  Both are available everywhere

Sep 13, 2012 at 12:01 AM

Hi, thanks for the response, It seems I was using an older version, I downloaded the latest one and now it seems to work with Inneractive, but now I have a different issue, not all of the screens on my game need ads, so I hide them by calling

 AdRotatorXNAComponent.Current.Invalidate(false);

AdRotatorXNAComponent.Current.Visible = false;           

AdRotatorXNAComponent.Current.Enabled = false;

and whenever I need them again I reappear them with:

 AdRotatorXNAComponent.Current.Visible = true;           

AdRotatorXNAComponent.Current.Enabled = true;           

AdRotatorXNAComponent.Current.AdPosition = new Vector2(x, y);

this works well for inneractive, but now I'm using also pub center with 50% probability, and whenever a new pub Center Ad appears all the previous pub Center ads do as well in their previous positions, this only happens with pub center, if at any time an inneractive ad appears the pub center ads disappear until another pub center ad appears. Is there anything I might be doing wrong?, thanks in advance

P.D. I've already tried calling invalidate before and after creating and dissapearing the ad, also invalidate(true) with the same results.

Coordinator
Sep 16, 2012 at 8:44 AM

Updated in the coming release, can disable by setting "IsEnabled" to false for AdRotator

Oct 16, 2012 at 8:04 PM

I've confirmed mikes issue.  Seems to have something to do with the invalidate command, weather true or false. doesn't seem to matter.

Coordinator
Oct 25, 2012 at 11:42 AM

The problem was that the way we were using PubCenter was not completely in line with the rest of the providers, should be OK in the latest release.

Feb 25, 2013 at 7:33 PM
Hate to necro this post, but I am having the same issue.

I have AdDuplex and Pubcenter configured, both at 50%. If I reload the game I can see that the 50/50 % is working, but if I call my hide and show methods, it never switches to a new ad or a new provider. Any idea what I am missing? Am I invalidating at the correct point in the flow?
public virtual void HideAd()
{
    AdRotatorXNAComponent foundComponent = null;
    
    foreach (var component in CurrentScreenManager.Game.Components)
    {
        foundComponent = component as AdRotatorXNAComponent;
        
        if (foundComponent != null)
        {
            foundComponent.IsEnabled = false;
            foundComponent.Visible = false;
            break;
        }
    }
}

public virtual void ShowAd()
{
    AdRotatorXNAComponent foundComponent = null;

    foreach (var component in CurrentScreenManager.Game.Components)
    {
        foundComponent = component as AdRotatorXNAComponent;

        if (foundComponent != null)
        {
            foundComponent.IsEnabled = true;
            foundComponent.Visible = true;
            foundComponent.Invalidate();
            break;
        }
    }
}
Coordinator
Feb 26, 2013 at 6:13 PM
Have you tried the Alpha build we posted recently which included a host of fixes.

If you just want to refresh the Ad before the provider time out then you only need to call the Invalidate function, but the provider will only give you a new ad from their site when they are ready to (prevents bashing).

Bind to the Log event for the control and you will see what AdRotator is up to and why it's selecting providers, may be that one of your providers has failed (not served ads) in which case the provider wouldn't change.

If you want the Ads to appear at a regular interval then use the sliding ad functionality as it's designed to work with your project.

P.S
Keep a reference to AdRotator in your game or other static reference rather than trolling the came components, if your game uses a lot of components then this could have a performance impact. Plus then you also don't need to search for a fixed element.

Hope this helps
Feb 27, 2013 at 4:46 PM
Thanks. I'll give it a shot. Will there be a non-location aware release of the alpha anytime soon?

And yes, I plan on making that a singleton. That is just left over from when I was removing the component rather than invalidating it.
Mar 7, 2013 at 4:50 PM
Hellow, I download the Alpha build.
I tried the sliding option and the Invalidate method.
But with InnerActive ad, I have no changes.

How can I solve this problem?!
Coordinator
Mar 15, 2013 at 10:44 PM
If one provider is not changing the Ad quickly enough for you, then this is likely due to protection routines the providers put on their end to prevent misuse or trying to overcharge the ratings.

I suggest putting a few extra providers in if you are concerned about the frequency of ads, alternatively use two adrotator controls with different AdUnit ID's for a provider and set the sliding timings accordingly so that they swap between themselves, although we don't recommend this as live practice as it could annoy the Ad Providers.

@BeyondTheDuck
We've not received sufficient feedback about the Alpha build, due to the time it takes to package and test these builds we need to ensure it meets everyone's needs as it will likely be the last V1 release (pending any critical issues) so we have time to finish V2