android - AdMob mediation reward video ads are not loading -


i trying implement admob reward video ads. far understanding error log ads being loaded device not being played in system. have read , write permission in android manifest file still not playing video ad.

plus showing me error @ function onrewardedvideoadfailedtoload ref #2 in codes.

can 1 read , point me mistake?

here error log getting ad not being displayed.

06-29 15:54:05.021 1548-1548/test.my.app d/viewrootimpl: viewpostimeinputstage processpointer 0 06-29 15:54:05.071 1548-1548/test.my.app d/viewrootimpl: viewpostimeinputstage processpointer 1 06-29 15:54:05.111 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:59] isactive: true 06-29 15:54:05.111 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:68] hidesoftinputfromwindow 06-29 15:54:05.131 1548-1548/test.my.app i/ads: ad closing. 06-29 15:54:05.191 1548-1548/test.my.app i/timeline: timeline: activity_launch_request id:test.my.app time:476669498 06-29 15:54:05.221 1548-1548/test.my.app w/displaylistcanvas: displaylistcanvas started on unbinded rendernode (without mowningview) 06-29 15:54:05.231 1548-1548/test.my.app w/cr_bindingmanager: cannot call determinedvisibility() - never saw connection pid: 1548 06-29 15:54:05.231 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:59] isactive: true 06-29 15:54:05.231 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:68] hidesoftinputfromwindow 06-29 15:54:05.231 1548-1548/test.my.app v/activitythread: updatevisibility : activityrecord{84787f5 token=android.os.binderproxy@d104b02 {test.my.app/test.my.app.showadactivity}} show : false 06-29 15:54:05.261 1548-1548/test.my.app w/resourcesmanager: gettoplevelresources: /data/app/vtest.my.app-2/base.apk / 1.0 running in test.my.app rsrc of package test.my.app 06-29 15:54:05.281 1548-1548/test.my.app i/adcolony: ==== adapter version 1.1.0 ==== 06-29 15:54:05.281 1548-1548/test.my.app i/adcolony: ==== configuring adcolony 2.3.5 app/zone ids: ==== 06-29 15:54:05.281 1548-1548/test.my.app i/adcolony: id_id_id 06-29 15:54:05.281 1548-1548/test.my.app i/adcolony: id_id_id 06-29 15:54:05.301 1548-1548/test.my.app i/unityads: com.unity3d.ads.android.unityads.init() (line:474) :: initializing unity ads version 1506 gameid 1087874 06-29 15:54:05.501 1548-1548/test.my.app i/art: rejecting re-init on previously-failed class java.lang.class<com.vungle.publisher.location.googlelocationclientdetailedlocationprovider> 06-29 15:54:05.501 1548-1548/test.my.app i/art: rejecting re-init on previously-failed class java.lang.class<com.vungle.publisher.location.googlelocationclientdetailedlocationprovider> 06-29 15:54:05.501 1548-1548/test.my.app i/art: rejecting re-init on previously-failed class java.lang.class<com.vungle.publisher.location.googlelocationclientdetailedlocationprovider> 06-29 15:54:05.621 1548-1548/test.my.app w/resourcesmanager: gettoplevelresources: /data/app/com.google.android.gms-2/base.apk / 1.0 running in test.my.app rsrc of package com.google.android.gms 06-29 15:54:05.621 1548-1548/test.my.app d/resourcesmanager: user 0 new overlays fetched null 06-29 15:54:05.621 1548-1548/test.my.app i/injectionmanager: inside getclasslibpath caller  06-29 15:54:05.621 1548-1548/test.my.app d/dynamitepackage: instantiating com.google.android.gms.ads.reward.chimerarewardedvideoadcreatorimpl 06-29 15:54:05.631 1548-1548/test.my.app i/ads: starting ad request. 06-29 15:54:05.701 1548-1548/test.my.app d/activity: performcreate call injection manager 06-29 15:54:05.701 1548-1548/test.my.app i/injectionmanager: dispatchonviewcreated > target : test.my.app.showvideoadactivity isfragment :false 06-29 15:54:05.701 1548-1548/test.my.app i/adcolony: [adc] adcolony resume called. 06-29 15:54:05.701 1548-1548/test.my.app d/secwifidisplayutil: metadata value : secsettings2 06-29 15:54:05.711 1548-1548/test.my.app d/viewrootimpl: #1 mview = com.android.internal.policy.phonewindow$decorview{d300ffa i.e...... r.....id 0,0-0,0} 06-29 15:54:05.741 1548-1606/test.my.app d/mali_winsys: new_window_surface returns 0x3000,  [1440x2560]-format:1 06-29 15:54:05.761 1548-1548/test.my.app w/displaylistcanvas: displaylistcanvas started on unbinded rendernode (without mowningview) 06-29 15:54:05.771 1548-1548/test.my.app d/viewrootimpl: msg_resized_report: ci=rect(0, 96 - 0, 0) vi=rect(0, 96 - 0, 0) or=1 06-29 15:54:05.781 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:59] isactive: false 06-29 15:54:05.781 1548-1548/test.my.app w/cr_screenorientation: removing inexistent observer! 06-29 15:54:05.811 1548-1548/test.my.app i/timeline: timeline: activity_idle id: android.os.binderproxy@ae13e3e time:476670117 06-29 15:54:05.841 1548-3294/test.my.app i/unityads: com.unity3d.ads.android.webapp.unityadswebdata.initcampaigns() (line:223) :: requesting unity ads ad plan https://impact.applifier.com/mobile/campaigns?platform=android&trackingenabled=1&advertisingtrackingid=276aa0d53c7c9fa84157df503f26c15c&rawadvertisingtrackingid=e2ab7fa8-1ff7-4c07-a28b-acfe938efd15&gameid=1087874&sdkversion=1506&softwareversion=23&hardwareversion=samsung+samsung-sm-g920a&devicetype=268435810&connectiontype=wifi&screensize=268435810&screendensity=640&encrypted=false 06-29 15:54:05.841 1548-3328/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:05.841 1548-3328/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:06.001 1548-1561/test.my.app w/ads: there problem getting ad response. errorcode: 0 06-29 15:54:06.001 1548-1548/test.my.app w/ads: failed load ad: 0 06-29 15:54:06.281 1548-3349/test.my.app w/system.err: stat failed: enoent (no such file or directory) : nullsession_info.txt 06-29 15:54:06.281 1548-3349/test.my.app w/system.err: stat failed: enoent (no such file or directory) : nullzone_state.txt 06-29 15:54:06.291 1548-3349/test.my.app w/system.err: remove failed: enoent (no such file or directory) : /data/user/0/test.my.app/files/adc/data/iap_cache.txt 06-29 15:54:06.331 1548-1548/test.my.app d/viewrootimpl: #3 mview = null 06-29 15:54:06.331 1548-3350/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:06.331 1548-3351/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:06.331 1548-3350/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:06.331 1548-3351/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:07.731 1548-1548/test.my.app i/unityads: com.unity3d.ads.android.webapp.unityadswebdata.campaigndatareceived() (line:684) :: unity ads initialized 19 campaigns , 2 zones 06-29 15:54:07.761 1548-3375/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:07.761 1548-3375/test.my.app i/system.out: (httplog)-static: issbsettingenabled false 06-29 15:54:07.891 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:30] constructor 06-29 15:54:07.891 1548-1548/test.my.app w/cr_awcontents: ondetachedfromwindow called when detached. ignoring 06-29 15:54:07.891 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:59] isactive: false 06-29 15:54:07.901 1548-1548/test.my.app i/cr_ime: imethread not enabled. 06-29 15:54:07.931 1548-1548/test.my.app w/cr_bindingmanager: cannot call determinedvisibility() - never saw connection pid: 1548 06-29 15:54:07.931 1548-1548/test.my.app d/cr_ime: [inputmethodmanagerwrapper.java:59] isactive: false 06-29 15:54:08.271 1548-1548/test.my.app i/chromium: [info:console(8603)] "resize handler called", source: http://cdn-highwinds.unityads.unity3d.com/impact/webview/production/impact/index.html?version=be098269d319580b55cf71b48f32e4feb030c1ce (8603) 06-29 15:54:08.391 1548-1548/test.my.app i/chromium: [info:console(8023)] "true", source: http://cdn-highwinds.unityads.unity3d.com/impact/webview/production/impact/index.html?version=be098269d319580b55cf71b48f32e4feb030c1ce (8023) 06-29 15:54:08.421 1548-1548/test.my.app i/chromium: [info:console(8586)] "hiding views", source: http://cdn-highwinds.unityads.unity3d.com/impact/webview/production/impact/index.html?version=be098269d319580b55cf71b48f32e4feb030c1ce (8586) 06-29 15:54:08.431 1548-1548/test.my.app i/chromium: [info:console(8584)] "showing: none", source: http://cdn-highwinds.unityads.unity3d.com/impact/webview/production/impact/index.html?version=be098269d319580b55cf71b48f32e4feb030c1ce (8584) 06-29 15:54:20.381 1548-1548/test.my.app i/adcolony: [adc] adcolony pause called. 06-29 15:54:20.971 1548-1548/test.my.app v/activitythread: updatevisibility : activityrecord{a9e58fe token=android.os.binderproxy@ae13e3e {test.my.app/test.my.app.showvideoadactivity}} show : true 06-29 15:54:31.591 1548-3348/test.my.app i/system.out: exiting monitor 

here code of showvideoadactivity file

import android.app.activity; import android.content.pm.activityinfo; import android.os.bundle; import android.support.design.widget.snackbar; import android.support.v7.app.alertdialog; import android.view.view; import android.view.windowmanager;  import com.chartboost.sdk.chartboost; import com.google.ads.mediation.admob.admobadapter; import com.google.android.gms.ads.adrequest; import com.google.android.gms.ads.mobileads; import com.google.android.gms.ads.reward.rewarditem; import com.google.android.gms.ads.reward.rewardedvideoad; import com.google.android.gms.ads.reward.rewardedvideoadlistener; import com.jirbo.adcolony.adcolony; import com.unity3d.ads.android.iunityadslistener; import com.unity3d.ads.android.unityads; import com.vungle.publisher.vunglepub; import com.vungle.publisher.eventlistener; import com.vungle.publisher.adconfig; import com.vungle.publisher.orientation; import com.vungle.publisher.vunglepub;   public class showvideoadactivity extends activity implements rewardedvideoadlistener, iunityadslistener {      //dialog builder dialogs     private alertdialog.builder dialog;      private static final string ad_unit_id = "ca-app-pub-";     private static final string app_id = "ca-app-pub-";      // vunglepub instance     final vunglepub vunglepub = vunglepub.getinstance();        private boolean misrewardedvideoloading;     private rewardedvideoad mad;     private final object mlock = new object();      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);          super.oncreate(savedinstancestate);           //keeping screen lights on         getwindow().addflags(windowmanager.layoutparams.flag_keep_screen_on);          //screen rotation off         this.setrequestedorientation(activityinfo.screen_orientation_portrait);           adcolony.configure(this, "version:0.1,store:google",                 "id",                 "id");         adcolony adcolony = new adcolony();          unityads.init(this, "id", this);          // initialize publisher sdk         vunglepub.init(this, "id");         vunglepub.seteventlisteners(vungledefaultlistener, vunglesecondlistener);          chartboost.startwithappid(this, "id", "id");         chartboost.oncreate(this);           mad = mobileads.getrewardedvideoadinstance(this);         mad.setrewardedvideoadlistener(this);           loadrewardedvideoad();          setcontentview(r.layout.activity_show_video_ad);      }      private void loadrewardedvideoad() {         synchronized (mlock) {             if (!misrewardedvideoloading && !mad.isloaded()) {                 misrewardedvideoloading = true;                 bundle extras = new bundle();                 extras.putboolean("_norefresh", true);                  adrequest adrequest = new adrequest.builder().addtestdevice("b9e3469f4f5b561227675dc9167efc16")                         .addnetworkextrasbundle(admobadapter.class, extras)                         .build();                 mad.loadad(ad_unit_id, adrequest);             }         }         showrewardedvideo();     }      private void showrewardedvideo() {         if (mad.isloaded()) {             mad.show();         }     }       @override     public void onhide() {      }      @override     public void onshow() {      }      @override     public void onvideostarted() {      }      @override     public void onvideocompleted(string s, boolean b) {      }      @override     public void onfetchcompleted() {      }      @override     public void onfetchfailed() {         snackbar snackbar = snackbar.make(getwindow().getdecorview().getrootview(),                 "ad loading failed!!! #1", snackbar.length_long);          snackbar.show();     }      @override     public void onrewardedvideoadloaded() {      }      @override     public void onrewardedvideoadopened() {      }      @override     public void onrewardedvideostarted() {      }      @override     public void onrewardedvideoadclosed() {         snackbar snackbar = snackbar.make(getwindow().getdecorview().getrootview(),                 "thank watching ad. ", snackbar.length_long);          snackbar.show();     }      @override     public void onrewarded(rewarditem rewarditem) {      }      @override     public void onrewardedvideoadleftapplication() {      }      @override     public void onrewardedvideoadfailedtoload(int i) {         snackbar snackbar = snackbar.make(getwindow().getdecorview().getrootview(),                 "ad loading failed!!! #2", snackbar.length_long);          snackbar.show();     }          private final eventlistener vungledefaultlistener = new eventlistener() {         @deprecated         @override         public void onvideoview(boolean iscompletedview, int watchedmillis, int videodurationmillis) {             // method deprecated , removed. please use onadend() instead.         }          @override         public void onadstart() {             // called before playing ad.         }          @override         public void onadunavailable(string reason) {             // called when vunglepub.playad() called no ad available show user.              snackbar snackbar = snackbar.make(getwindow().getdecorview().getrootview(),                     "ad loading failed!!! #3", snackbar.length_long);              snackbar.show();              system.out.println("~~");             system.out.println("~~");             system.out.println("~~");             system.out.println("~~");             system.out.println("1");             system.out.println(reason);             system.out.println("~~");             system.out.println("~~");             system.out.println("~~");          }          @override         public void onadend(boolean wascalltoactionclicked) {             // called when user leaves ad , control returned application.         }          @override         public void onadplayablechanged(boolean isadplayable) {             // called when ad playability changes.             final boolean enabled = isadplayable;             runonuithread(new runnable() {                 @override                 public void run() {                  }             });         }     };      private final eventlistener vunglesecondlistener = new eventlistener() {         // vungle sdk allows multiple listeners attached. secondary event listener         // going print logs now, used pause music, update badge icon, etc.         @deprecated         @override         public void onvideoview(boolean iscompletedview, int watchedmillis, int videodurationmillis) {}          @override         public void onadstart() {}          @override         public void onadunavailable(string reason) {             snackbar snackbar = snackbar.make(getwindow().getdecorview().getrootview(),                     "ad loading failed!!! #4", snackbar.length_long);              snackbar.show();              system.out.println("~~");             system.out.println("~~");             system.out.println("~~");             system.out.println("~~");             system.out.println("2");             system.out.println(reason);             system.out.println("~~");             system.out.println("~~");             system.out.println("~~");          }          @override         public void onadend(boolean wascalltoactionclicked) {}          @override         public void onadplayablechanged(boolean isadplayable) {          }     };  } 

sorry late answer, had same problem , found this:

admob doesn't provide test ads. have remove line:

.addtestdevice("b9e3469f4f5b561227675dc9167efc16")

additionally have use test ad unit id provided admob:

android: ca-app-pub-3940256099942544/5224354917

you can find explained in more detail here.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -