Android Question Any news about Native Ads Advanced?

Discussion in 'Android Questions' started by asales, Jan 9, 2018.

  1. asales

    asales Well-Known Member Licensed User

    Hi @Erel
    I have several Native Ads Express in my apps and the existing units will stop serving ads on March 1, 2018 (

    The new Native Ads Advanced is available now and I can create this Ads (I think the information in page "Native is currently in a closed beta with a limited group of publishers" is out of date), but I don't have a option in FirebaseAdmob library to use it, only NativeExpressAd.


    Any news about when we can get the updated FirebaseAdmob library?

    Thanks in advance for your attention about this issue.
    Multiverse app and analizer3816 like this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    It looks like it is still not publicly available:

    1: [​IMG]

    2: [​IMG]
    Multiverse app likes this.
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. asales

    asales Well-Known Member Licensed User

    Weird, because to me they it appears (see image below).

    I can create the native ads but I can use they in B4A.

    But I saw the answer of the SDK team: the native express is discontinued but they don't have a timeline to release the native advanced. Bad news, but thanks for your effort!
  5. analizer3816

    analizer3816 Member Licensed User

  6. Erel

    Erel Administrator Staff Member Licensed User

    I will add it to FirebaseAdMob once it is publicly available.
  7. Multiverse app

    Multiverse app Active Member Licensed User

    I have been waiting to get native advanced ads for months now. Banner ads look ugly and have very less RPM. let's hope Google makes it available fast.
    asales likes this.
  8. asales

    asales Well-Known Member Licensed User

  9. Douglas Farias

    Douglas Farias Expert Licensed User

    Hi @Erel .
    Sorry to reopen a old thread.

    but you have a plan to add advanced native ads to firebase admob lib?
    if yes can you talk when?(day)?

    we have some apps with normal native ads and on day 01 of month 02 (01/02) it will no more works.
    google contacted me and talked about, change with urgency native ads to advanced native ads (the normal native ads will show only a blank page).

    Last edited: Jan 29, 2018
    asales likes this.
  10. DonManfred

    DonManfred Expert Licensed User

    He already answered this. He´ll add them if the are publicity available.

    They are still in Beta! So i guess nothing will happen and he can´t answer when as it is not known when they are public available.
    Peter Simpson likes this.
  11. asales

    asales Well-Known Member Licensed User

    I'm in same boat of @Douglas Farias.
    For me too the native ads is not in beta stage anymore.
    There is a deadline from the Google and the will stop show ads.
  12. DonManfred

    DonManfred Expert Licensed User

    Based on the Docu it is still in beta.
  13. asales

    asales Well-Known Member Licensed User

    This is a deadline letter that Google sent to me.

    The problem is that I use the native express ads in several places that not is recomended to use a banner.

  14. Multiverse app

    Multiverse app Active Member Licensed User

    Native ads are not public yet. Hope they come out soon.
    DonManfred likes this.
  15. Erel

    Erel Administrator Staff Member Licensed User

    This code will help you get started:
    Sub LoadNativeAd
    Dim AdUnitId As String = "ca-app-pub-3940256099942544/2247696110"
    Dim ctxt As JavaObject
    Dim builder As JavaObject
    ""Array(ctxt, AdUnitId))
    Dim OnContentAdLoadedListener As Object = builder.CreateEventFromUI("com/google/android/gms/ads/formats/NativeContentAd.OnContentAdLoadedListener".Replace("/""."), _
    Dim Listener As JavaObject
    Application.PackageName & ".main$MyAdListener"Array("NativeAd"))  'change 'main' with the current activity module name
    Dim AdLoader As JavaObject = builder.RunMethod("build"Null)
    Dim AdRequestBuilder As JavaObject
    "com/google/android/gms/ads/AdRequest.Builder".Replace("/""."), Null)
    Wait For ContentAdLoaded_Event (MethodName As String, Args() As Object)
    Dim NativeContentAd As JavaObject = Args(0)
    Dim NativeContentAdView As JavaObject
    "com/google/android/gms/ads/formats/NativeContentAdView".Replace("/""."), _
    Dim pNativeAdView As Panel = NativeContentAdView
    Dim content As Panel
    Dim lbl As Label
       lbl.Text = NativeContentAd.RunMethod(
    Dim lbl2 As Label
       lbl2.Text = NativeContentAd.RunMethod(
    Dim logo As JavaObject = NativeContentAd.RunMethod("getLogo"Null)
    If logo.IsInitialized Then
    Log("adding logo")
    Dim logoView As Panel
           logoView.Background = logo.RunMethod(
    End If
    Dim images As List = NativeContentAd.RunMethod("getImages"Null)
    If images.IsInitialized And images.Size > 0 Then
    Log("adding image")
    Dim imgView As Panel
    Dim image As JavaObject = images.Get(0)
           imgView.Background = 
    End If
    Activity.AddView(pNativeAdView, 00100%x200dip)
    End Sub

    Sub NativeAd_FailedToReceiveAd (ErrorCode As String)
    Log("NativeAd_FailedToReceiveAd: " & ErrorCode)
    End Sub

    Sub NativeAd_AdOpened
    End Sub

    #if Java
    public static class MyAdListener extends {
       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 onAdOpened() {
           processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_adopened", false, null);
       public void onAdLoaded() {
           processBA.raiseEventFromDifferentThread(null, null, 0, eventName + "_receivead", false, null);
    #End If
    This is not complete. You can see all the available resources here:
    Each resource should be set to a view and you should then call NativeContentAdView setXXXView.

    Note that it will be easier to create the layout with the designer and load it with content.LoadLayout.
    Last edited: Feb 15, 2018
  16. asales

    asales Well-Known Member Licensed User

    Thank you very much, @Erel.

    I'm try several modifications in this code.
    One thing that I want to do is to show 2 native ads in same activity.
    So I created a sub "LoadNativeAd2" and I call LoadNativeAd (top = 0) and LoadNativeAd2 (top = 50%y), but only last sub that I call is showing.
    LoadNativeAd (first)
    LoadNativeAd2 (last)
    LoadNativeAd2 (first)
    LoadNativeAd (last)

    don't matter

    What could be happening?
    How I can show 2 ads in same activity?

    Thanks in advance for any tip.
  17. Erel

    Erel Administrator Staff Member Licensed User

    Change the wait for line to:
    Wait For (builder) ContentAdLoaded_Event (MethodName As String, Args() As Object)
    asales and Peter Simpson like this.
  18. Douglas Farias

    Douglas Farias Expert Licensed User

    Hi erel.

    i m tested your code today, and this give some crash

    how can i fix this pls?
    i see u made a if to check if contains image, the code enter on this if but i dont know give crash when will get the image
  19. Erel

    Erel Administrator Staff Member Licensed User

    Run it in debug mode. Which line raises the error (post the code itself)?
  20. Douglas Farias

    Douglas Farias Expert Licensed User

    sorry to dont post the line.
    the error on debug mode is on this line

    imgView.Background = logo.RunMethod("getDrawable"Null)

    here is the log
    Note: Duploxxis Delivery on log its a ad name. (it is working getting ads title)
    the problem is the image only
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice