What is the difference between onPresentScreen and onLeaveApplication?

The Admob SDK has an interface called AdListener described below.

public interface AdListener {
  public void onReceiveAd(Ad ad);
  public void onFailedToReceiveAd(Ad ad, AdRequest.ErrorCode error);
  public void onPresentScreen(Ad ad);
  public void onDismissScreen(Ad ad);
  public void onLeaveApplication(Ad ad);


I am trying to do something if a user clicks on an ad. I believe there are two fields that occur when a user clicks on an ad, namely onPresentScreen()

and onLeaveApplication()

. Is that correct and is there any difference between the two?


source to share

1 answer


fired when an ad causes the device to switch to another application, such as a web browser, when the ad is clicked.


fired when an ad creates something full screen.

In the likely case of a web browser or marketplace ad rendering, both of these callbacks are triggered after the ad is clicked. But, in theory, clicking on an ad could create a new activity in your application, in which case it onPresentScreen()

would be launched but onLeaveApplication()


The aforementioned corner register can be especially applicable for those who use DoubleClick for Publishers and have more control over the inventory they serve - AdMob live ad doesn't load new activity in your app.



All Articles