listener = new RevMobAdsListener() {
@Override
public void onRevMobAdClicked() {
Log.i("[RevMob]", "Advertisement Clicked!");
revmob.openAdLink(application, APPLICATION_ID, this);
return;
}
@Override
public void onRevMobAdDismiss() {
Log.i("[RevMob]", "Advertisement Closed!");
fullscreenAd.hide();
}
@Override
public void onRevMobAdDisplayed() {
Log.i("[RevMob]", "Advertisement Displayed!");
}
@Override
public void onRevMobAdNotReceived(String message) {
Log.i("[RevMob]", "No Advertisement Available!");
}
@Override
public void onRevMobAdReceived() {
Log.i("[RevMob]", "Advertisement Pulled from network!");
}
@Override
public void onRevMobSessionIsStarted() {}
@Override
public void onRevMobSessionNotStarted(String arg0) {}
};
So what the problem is, is that once I click on the advertisement it continuously opens tabs in my browser.
LogCat spams the following debug messages. (In order)
Advertisment Pulled from network!
Advertisement Displayed!
Reporting impression using testing mode: with_ads
Advertisement Clicked!
^The above is apmmed on repeat, everytime it opens a new tab
Look at your first listener (onRevMobAdClicked): when you click the first ad, this listener is called, and it calls an adlink.
By default (from RevMob SDK), when called (openAdLink), the link calls automatically onRevMobAdReceived, onRevMobAdDisplayed and onRevMobAdClicked listeners.
Then, this adlink is opened and it fires this same listener (onRevMobAdClicked), calling again the adlink, which will fire the listener, which will call again the adlink, ..........
You have to change the way you call the link.
Also, you don't need to call fullscreen.hide() in onRevMobAdDismiss. When the fullscreen is dismissed by the user, this event is fired.
Hope that helps!