I'm trying to use the Admob Native Ad in B4XPages.
I the Main module I have the sub thats show if the native ad added in B4XMainPages was received:
Now I want to put a native ad in a new b4xpage (B4XPage_Native):
How I can check if the ad2 was received in this new page?
Thanks in advance for any tip.
I the Main module I have the sub thats show if the native ad added in B4XMainPages was received:
B4X:
(MAIN):
Sub NativeAd_ReceiveAd
B4XPages.MainPage.NativeAd_ReceiveAd
End Sub
#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 onAdLoaded() {
processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_receivead", false, null);
}
}
#End If
(B4XMAINPAGE):
Sub NativeAd_ReceiveAd
Log("Ad1_ReceiveAd")
End Sub
Now I want to put a native ad in a new b4xpage (B4XPage_Native):
B4X:
(B4XPAGE_NATIVE):
Sub NativeAd2_ReceiveAd
Log("Ad2_ReceiveAd")
End Sub
How I can check if the ad2 was received in this new page?
Thanks in advance for any tip.