Android Question New events in Admob banner

asales

Expert
Licensed User
Longtime User
The banner component of FirebaseAdmob lib has only this events: ReceiveAd, FailedToReceiveAd, AdScreenDismissed.

In this link:
there are more events, like onAdClicked, onAdImpression and onAdOpened.

Can I use this events in the banner without an update to the lib?

Thanks in advance for any tips.
 

asales

Expert
Licensed User
Longtime User
onAdOpened = PresentScreen

The other two are not implemented in the library.
We have this events, using Java code to the native ad example, included "onAdClicked".
I saw how to use it when I created the native ad, but don't know if is possible to use with the banner ad. If yes, how?
Thanks in advance.
B4X:
#if Java
public static class MyAdListener extends com.google.android.gms.ads.AdListener {
   String eventName;
   public MyAdListener(String s) {
       eventName = s.toLowerCase(BA.cul);
   }
   public void onAdClosed() {
       processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_adclosed", false, null);
   }
   public void onAdFailedToLoad(int arg0) {
       processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_failedtoreceivead", false, new Object[] {String.valueOf(arg0)});
   }
   public void onAdLeftApplication() {
       processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_adleftapplication", false, null);
   }
   public void onAdLoaded() {
       processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_receivead", false, null);
   }   
   public void onAdClicked() {
       processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_clicked", false, null);
   }
}
#End If
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
I don't see how this event will help with AdView. You cannot cancel the process at that point.
I mean I may not issue the load-ad event if ad is clicked for a few minutes say (using timer)
 
Upvote 0
Top