Android Question AdMob Native Ads lib

SMOOTSARA

Active Member
Licensed User
Longtime User
Hi

Which library is the best way to implement "AdMob Native Ads" on B4A 11.5 ?
 
Solution
Thank you
There is an error with this example
I think the library and Sdk settings are problematic !!

If you are using version 11.5 B4A
What libraries and versions have you used?
and the Sdk settings?

thank you


The problem was solved

Remove the SDK and install new SDK
Download and install new res folder

Good luck

asales

Expert
Licensed User
Longtime User
I'm using the FirebaseAdmob2 with an update in the original code from Erel.
Here the example:
 
Upvote 0

SMOOTSARA

Active Member
Licensed User
Longtime User


Hi asales

When I run this example in B4A ver 11.5, I exit the program with an error in the following lines


B4X:
BannerAdView1.LoadAd
mwAdInterstitial.LoadAd
AdViewRect.LoadAd
AdViewBanner.LoadAd
AdViewIAB.LoadAd
mwAdInterstitial2.LoadAd
mwAdInterstitial.LoadAd
AdLoader.RunMethod("loadAd", Array(AdrequestBuilder.RunMethod("build", Null)))

B4X:
Copying updated assets files (9)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
ShowOpenAdIfAvailable: false
onConsentInfoUpdateFailure: Publisher misconfiguration: Failed to read publisher's account configuration; please check your configured app ID. Received app ID: `ca-app-pub-3940256099942544~3347511713`., code: 3
Consent: UNKNOWN
OpenAd received
Native Ad initializing. This will be a test ad.
Trying to load unified native ad
java.lang.IncompatibleClassChangeError: The method 'java.lang.Class java.lang.Object.getClass()' was expected to be of type interface but instead was found to be of type virtual (declaration of 'com.google.android.gms.dynamic.ObjectWrapper' appears in /data/app/admob.tests-2/base.apk)
    at com.google.android.gms.dynamic.ObjectWrapper.unwrap(com.google.android.gms:play-services-basement@@18.0.2:4)
    at com.google.android.gms.internal.ads.zzcau.<init>(com.google.android.gms:play-services-ads-lite@@20.6.0:2)
    at com.google.android.gms.internal.ads.zzcav.<init>(com.google.android.gms:play-services-ads-lite@@20.6.0:7)
    at com.google.android.gms.internal.ads.zzcbc.zze(com.google.android.gms:play-services-ads-lite@@20.6.0:1)
    at com.google.android.gms.internal.ads.zzbpv.zzbQ(com.google.android.gms:play-services-ads-lite@@20.6.0:5)
    at com.google.android.gms.internal.ads.zzaok.onTransact(com.google.android.gms:play-services-ads-base@@20.6.0:3)
    at android.os.Binder.transact(Binder.java:499)
    at aed.be(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604000.439654529.439654529:2)
    at com.google.android.gms.ads.internal.formats.client.ak.e(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604000.439654529.439654529:0)
    at com.google.android.gms.ads.nonagon.ad.nativead.ae.run(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604000.439654529.439654529:5)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at arh.a(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604000.439654529.439654529:0)
    at com.google.android.gms.ads.internal.util.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604000.439654529.439654529:1)
    at arh.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604000.439654529.439654529:0)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6138)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I don't know. Is the same example and works fine here.
I get the native ad as the show in this image:



B4X:
OpenAd received
Adview received
Native Ad initializing. This will be a test ad.
Trying to load unified native ad
UnifiedAdLoaded_Event
Test Ad : Google Ads
Stay up to date with your Ads Check how your ads are performing
null
INSTALAR
GRÁTIS
4.5
Google Play
Bundle[EMPTY_PARCEL]
Test Ad : Google Ads
Native Ad Received

Try to remove the native ad and check if the others ads is showing correctly.

Try this example from @Jack Cole too:
 
Upvote 0

SMOOTSARA

Active Member
Licensed User
Longtime User
Thank you
There is an error with this example
I think the library and Sdk settings are problematic !!

If you are using version 11.5 B4A
What libraries and versions have you used?
and the Sdk settings?

thank you
 
Upvote 0

SMOOTSARA

Active Member
Licensed User
Longtime User
Thank you
There is an error with this example
I think the library and Sdk settings are problematic !!

If you are using version 11.5 B4A
What libraries and versions have you used?
and the Sdk settings?

thank you


The problem was solved

Remove the SDK and install new SDK
Download and install new res folder

Good luck
 
Upvote 0
Solution

SMOOTSARA

Active Member
Licensed User
Longtime User
Thank you
There is an error with this example
I think the library and Sdk settings are problematic !!

If you are using version 11.5 B4A
What libraries and versions have you used?
and the Sdk settings?

thank you
The problem was solved

Remove the SDK and install new SDK
Download and install new res folder

Good luck
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…