Reputation: 1331
I am running the following inside my OnCreate method:
mAdView.setAdListener(new AdListener() {
@Override
public void onReceiveAd(Ad ad) {
slideEnabler = true;
}
});
In the above code, the compiler is having issues with the term "Ad" in onReceiveAd(Ad ad).
It does not recognise this term despite the fact that exactly 100% of all examples I have seen regarding this method using that exact temrinology. The compiler is suggesting that I create the class 'Ad'.
What have I done wrong? Why does it work for everyone else?
Upvotes: 1
Views: 144
Reputation: 1331
I am not sure why all the examples in every post on the internet about this are wrong, but I am assuming that onReceiveAd is simply old code that is not relevant any more. With that in mind, I got exactly what I was after by using a different command:
mAdView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
slideEnabler = true;
}
});
Hope this helps someone else who is confused by this issue.
Upvotes: 1