Hi,
Please, banner fails to load (most of attempts as a Error Code 0) on EventActivity.
Considerations:
1) Result is the same on emulator, on real devices, using test_id or using real_id.
2) I have a working TestBanner1 on a recyclerView on MainActivity (but for some reason a regular BANNER fails to load on EventActivity).
3) I tried to attach mediation-test-suite:0.9.2: everything green but it shows a config problem ... again not possible to be it because i have a working ad in another activity using the same ad_unit_id
4) I tried to remove the MainActivity banner to see if there was something affecting. It did not work
5) The problem is not the ad_unit_id. As I said I am using also the test_id.
6) See below that I tried with different devices, diferent versions of play-services-ads, i tried to remove other things to see if something was affecting and many other things that I am not mentioning... but really nothing have worked.
Guys, honestly, I have no clue on my side what should i do. Logs are definitely not showing the problem. I need your help.
<string name="admob_app_id">ca-app-pub-3940256099942544~3347511713</string>
<string name="admob_adunit_id_main">ca-app-pub-3940256099942544/6300978111</string>
<string name="admob_adunit_id_bottomevent">ca-app-pub-3940256099942544/6300978111</string>
ATTEMPT1:
android:id="@+id/event_relative_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="doein.doeinproject.Event">
...
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/admob_adunit_id_bottomevent"></com.google.android.gms.ads.AdView>
</RelativeLayout>
code:
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("62EBAC7D548795CF72CE37271865DEDB")
.addTestDevice("3E951848FB5722A8EA187DE7EF7784B9")
.addTestDevice("2D5BE582E26E348E8FAEFD4FD4FBC178")
.build();
mAdView.loadAd(adRequest);
ATTEMPT2: using play-services-ads:11.0.0
11-14 16:51:46.939 9952-9952/doein.doeinproject I/dalvikvm: Could not find method android.webkit.WebChromeClient.onPermissionRequest, referenced from method com.google.android.gms.internal.ads.zzaqo.onPermissionRequest
11-14 16:51:46.939 9952-9952/doein.doeinproject I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method com.google.android.gms.internal.ads.zzaqo.onPermissionRequest
11-14 17:00:27.936 9952-9952/doein.doeinproject I/Ads: Starting ad request.
11-14 17:00:27.936 9952-9952/doein.doeinproject I/Ads: This request is sent from a test device.
11-14 17:01:29.251 9952-9952/doein.doeinproject E/Ads: Timed out waiting for WebView to finish loading.
ATEMPT4: using Real device:
11-14 17:10:39.120 16951-16951/doein.doeinproject I/Ads: Updating ad debug logging enablement.
11-14 17:10:41.680 16951-17119/doein.doeinproject W/Ads: Update ad debug logging enablement as false
11-14 17:10:45.600 16951-16951/doein.doeinproject I/Ads: This request is sent from a test device.
11-14 17:10:45.730 16951-17527/doein.doeinproject W/Ads: Invoke Firebase method getInstance error.
11-14 17:10:45.730 16951-17527/doein.doeinproject W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
11-14 17:10:46.350 23198-17556/? I/Ads: SDK version: afma-sdk-a-v14366007.11010000.1
11-14 17:11:47.410 16951-16951/doein.doeinproject I/Ads: Ad failed to load : 0
ATTEMPT5:
AdView mAdView = new AdView(this);
mAdView.setAdSize(AdSize.MEDIUM_RECTANGLE);
mAdView.setAdUnitId(getResources().getString(R.string.admob_adunit_id_bottomevent));
FrameLayout frameLayout = (FrameLayout) findViewById(R.id.ev_frame_adview);
frameLayout.addView(mAdView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
mAdView.setAdListener(new AdListener() {
=> play-services-ads:17.1.1
.internal.ads.zzbfy.onPermissionRequest
11-14 16:44:58.956 9585-9585/doein.doeinproject I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method com.google.android.gms.internal.ads.zzbfy.onPermissionRequest
11-14 16:44:59.920 9585-9632/doein.doeinproject W/Ads: Invoke Firebase method getInstance error.
11-14 16:44:59.920 9585-9632/doein.doeinproject W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
11-14 16:45:01.356 9585-9585/doein.doeinproject I/Ads: Starting ad request.
11-14 16:45:01.356 9585-9585/doein.doeinproject I/Ads: SDK version: afma-sdk-a-v14300000.14300000.0
11-14 16:45:01.360 9585-9585/doein.doeinproject I/Ads: Use AdRequest.Builder.addTestDevice("62EBAC7D548795CF72CE37271865DEDB") to get test ads on this device.
11-14 16:45:01.368 9585-9585/doein.doeinproject W/Ads: Not retrying to fetch app settings
11-14 16:46:02.855 9585-9585/doein.doeinproject E/Ads: Timed out waiting for WebView to finish loading.
ATTEMPT6: using play-services-ads:11.0.0
11-14 16:49:23.672 9769-9769/doein.doeinproject I/Ads: Starting ad request.
11-14 16:49:23.672 9769-9769/doein.doeinproject I/Ads: Use AdRequest.Builder.addTestDevice("62EBAC7D548795CF72CE37271865DEDB") to get test ads on this device.
11-14 16:49:23.684 9769-9769/doein.doeinproject W/Ads: Not retrying to fetch app settings
11-14 16:50:24.892 9769-9769/doein.doeinproject E/Ads: Timed out waiting for WebView to finish loading.
ATTEMPT7: using publisher:
<com.google.android.gms.ads.doubleclick.PublisherAdView
android:id="@+id/publisherAdView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="/6499/example/banner">
</com.google.android.gms.ads.doubleclick.PublisherAdView>
mPublisherAdView = findViewById(R.id.publisherAdView);
PublisherAdRequest adRequest = new PublisherAdRequest.Builder().build();
mPublisherAdView.loadAd(adRequest);
-14 14:54:35.945 1643-1643/doein.doeinproject I/Ads: SDK version: afma-sdk-a-v14300000.14300000.0
11-14 14:54:35.947 1643-1643/doein.doeinproject I/Ads: Use AdRequest.Builder.addTestDevice("54139152462B86D6D5712AC747383BE6") to get test ads on this device.
11-14 14:54:46.031 1643-1683/doein.doeinproject E/Ads: Error waiting for future.
java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
at com.google.android.gms.internal.ads.zzbcl.get(Unknown Source)
at com.google.android.gms.internal.ads.zzbbq.zza(Unknown Source)
at com.google.android.gms.internal.ads.zzatq.zza(Unknown Source)
at com.google.android.gms.internal.ads.zzatq.zzb(Unknown Source)
at com.google.android.gms.internal.ads.zzats.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.util.concurrent.TimeoutException
at com.google.android.gms.internal.ads.zzbbu.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
11-14 14:54:46.031 1643-1683/doein.doeinproject W/Ads: There was a problem getting an ad response. ErrorCode: 0
11-14 14:54:46.032 1643-1643/doein.doeinproject W/Ads: Failed to load ad: 0
I have no idea what's going on.