Admob not working on Android now

22 views
Skip to first unread message

Carlos Verdier

unread,
May 7, 2020, 3:13:54 PM5/7/20
to CodenameOne Discussions
Hi

I don't know if it's me, if I'm too tired and I'm doing something wrong, but now Admob is not working for me on Android.

Steve fixed Admob for iOS, and Android was working fine nust a couple of days ago. Now, all of the sudden it's Android the one in trouble. Like I said, maybe I touched something, but I doubt it.

Here are some build hints that might be relevant. Please, let me know if you need more info. Thanks.

codename1.arg.android.xapplication=<meta-data android\:name\="com.google.android.maps.v2.API_KEY" android\:value\="xxxxxxxxxxxxxxx"/><meta-data android\:name\="com.google.android.gms.version" android\:value\="@integer/google_play_services_version" /><activity android\:name\="com.google.android.gms.ads.AdActivity" android\:configChanges\="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /><meta-data android\:name\="com.google.android.gms.ads.APPLICATION_ID" android\:value\="ca-app-pub-xxxxxxxxxxxxx"/>

codename1.arg.android.xpermissions=<uses-permission android\:name\="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android\:name\="android.permission.READ_CALENDAR"/> <uses-permission android\:name\="android.permission.WRITE_CALENDAR"/> <uses-permission android\:name\="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <uses-feature         android\:glEsVersion\="0x00020000"         android\:required\="true"/> <uses-permission android\:name\="com.google.android.providers.gsf.permission.READ_GSERVICES"/><uses-feature         android\:glEsVersion\="0x00020000"         android\:required\="true"/>codename1.secondaryTitle\=Turismo Cultural en Familia<uses-permission android\:name\="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android\:name\="com.google.android.providers.gsf.permission.READ_GSERVICES"/><uses-feature         android\:glEsVersion\="0x00020000"         android\:required\="true"/>

codename1.arg.android.playService.ads=true

android.playService.ads=true

Shai Almog

unread,
May 8, 2020, 1:45:38 AM5/8/20
to CodenameOne Discussions
Hi,
I don't see anything off the top of my head. Is there a warning in the device console?

Carlos Verdier

unread,
May 8, 2020, 5:09:00 AM5/8/20
to CodenameOne Discussions
I can see this in the output:

05-08 10:19:27.166 4144-4176/? W/System.err: inside AdMobFullPageImpl.isLoaded - activity is not null
05-08 10:19:27.166 4144-4144/? W/System.err: loaded = false

I can see those lines in AdMobNativeImpl.java
The first line is ok, nothig wrong there
But I don't get why is not loading

If I implement setAdsListener, I can see an error 3 in onAdFailedToLoad. So I guess the code is fine but for some reason Google is not serving ads for this app, which is in development stage, still no in stores. I could think of some misconfiguration on Admob panel, but this same app was showing ads just a few days ago, and iOS is showing ads for this same app.

Steve Hannah

unread,
May 8, 2020, 8:46:34 AM5/8/20
to codenameone...@googlegroups.com
One thing to check is that ad id, as I think Android and iOS can't use the same ad ids.  Try the test ads they provide and see if they work.

Notice the Ids for the iOS test ads are different than for the Android test ads.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/969c7fa0-2bce-4db7-a897-7171c5112d49%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Carlos Verdier

unread,
May 8, 2020, 12:02:51 PM5/8/20
to CodenameOne Discussions
Yes the test ad works, but not the real one.

I even created a new app with its own add unit, but nothing works.

Maybe the app is blocked for some reason, but I can't see any message in the panel stating that... It's weird.
Reply all
Reply to author
Forward
0 new messages