android - AdView won't load an ad from AdMob -
i'm trying test ad working on real device. in logcat saw following (some characters changed due security reasons):
08-15 14:17:55.763: i/ads(19134): test ads on device, call adrequest.addtestdevice("a84885c745a637a0ac110bf96afd31d9");
i did setup looks like:
adview ad = (adview) findviewbyid(r.id.ad); adrequest req = new adrequest(); req.addtestdevice("a84885c995b637a0ac110bf96ffd31d9"); ad.loadad(req);
layout:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v4.view.viewpager android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/ad" android:background="@drawable/smoke_bg" tools:context=".main" /> <com.google.ads.adview android:id="@+id/ad" android:layout_width="match_parent" android:layout_height="50dp" android:layout_alignparentbottom="true" ads:adsize="banner" ads:adunitid="pub-xxxxxxxxxxxxxxx" ads:loadadoncreate="false" />
i tried use id returned telephonymanager.getdeviceid()
method. result didnt change. in manifest file, adding or removing following line changes absolutely nothing:
<meta-data android:name="admob_publisher_id" android:value="pub-xxxxxxxxxxxxxxxxxx" />
i'm getting following message in logcat (some values changed due security reasons):
08-15 22:11:27.173: i/ads(22524): adrequesturlhtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>afma_buildadurl({"preqs":4,"session_id":"9062394107923473758","seq_num":"5","slotname":"pub-xxxxxxxxxxxxxxxx","u_w":320,"msid":"some.package.name","adtest":"on","js":"afma-sdk-a-v6.4.1","bas_off":0,"net":"wi","app_name":"1.android.some.app.name","hl":"en","gnt":3,"carrier":"26201","u_audio":1,"u_sd":1.5,"ms":"usogpehfztwaclhr9aotqb9cgmw4bpjww5rwuot5u8_c7w7-dnldnfewvora8lvymvb1ktpyiq4zynnpxadct2s8zeo_ww5ngrh8qcc7ln2sh8ehzifmef31axhagwe_prjebuic6su-pmiqi9cntfeo4llgbquxwd8u9majlwpmpu6xwox2ws3o0pty42j-wijnrtttqg9wayjwgeclcv4sotmp1a2fzesvpfsg0xopu_nqxo1uucnvkicpeedisp7cn6obg_mdczlphnawjqn_wunjttkoca6y511ufp3odhkazumyzx8ynynzhca8gjpafnnqnp3m_pnz0knmqg","mv":"80230010.com.android.vending","isu":"a86885c745a637a0ab110bf96fdd31d9","format":"320x50_mb","oar":0,"ad_pos":{"height":75,"visible":1,"y":725,"x":0,"width":480},"u_h":533,"pt":1,"bas_on":0,"ptime":245460});</script></head><body></body></html> 08-15 22:11:27.233: i/ads(22524): received ad url: <url: "null" type: "unknown" afmanotifydt: "null" activationoverlayurl: "null" usewebviewloadurl: "false"> 08-15 22:11:27.233: d/webcore(22524): uioverrideurlloading: shouldoverrideurlloading() returnstrue 08-15 22:11:27.233: i/ads(22524): adloader timed out after 60000ms while getting url. 08-15 22:11:27.238: d/webviewglue(22524): nativedestroy view: 0x4fa92f40 08-15 22:11:27.238: i/ads(22524): onfailedtoreceivead(a network error occurred.) 08-15 22:11:27.238: i/gate(22524): <gate-m>dev_action_completed</gate-m>
this message appears after start app, device has active data connection , required permissions set. ideas?
p.s. proguard not enabled
remove adview attribute ads:loadadoncreate="false" , try changing device after cleaning app
Comments
Post a Comment