android - Admob ads not showing up -
i've got problem admob not showing ads...
here's logcat:
warn/admobsdk(502): ignoring requestfreshad() because requesting ad right already. info/admobsdk(502): no fill. server replied no ads available (1164ms) info/admobsdk(502): no fill. server replied no ads available (846ms) i've tried test mode, no test mode, emulator, real phone, etc. never shows up, i requests , prints on admob stats, if ever worked...
afaik, did in admob android sdk... thing cause of problems, imho, fact i'm using tabbed layout scrollview , relativelayout ad shows...
here's sample of layout tab:
<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:myapp="http://schemas.android.com/apk/res/com.xxx.xxx" android:id="@+id/tababout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff000000"> <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff000000" android:padding="10px"> <imageview android:id="@+id/label_img" android:src="@drawable/about_header" android:layout_width="fill_parent" android:layout_height="wrap_content" android:adjustviewbounds="true" android:scaletype="centerinside" /> <textview android:id="@+id/label_know_more_desc" style="@style/desc" android:layout_below="@id/label_img" android:text="@string/tab_about_know_more_desc" /> <button android:id="@+id/bt_know_more" style="@style/button" android:gravity="center_vertical|center_horizontal" android:layout_below="@id/label_know_more_desc" android:text="@string/tab_about_know_more_bt" /> <com.admob.android.ads.adview android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" myapp:backgroundcolor="#000000" myapp:primarytextcolor="#ffffff" myapp:secondarytextcolor="#cccccc" /> </relativelayout> </scrollview> and here's main.xml, not think need it:
<?xml version="1.0" encoding="utf-8"?> <tabhost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff000000"> <linearlayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <tabwidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <framelayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff000000" android:paddingtop="5px"> </framelayout> </linearlayout> </tabhost> i've read in admob ads not display when placed inside tabview problem 10px padding i'm throwing in, if disable that, doesn't work.
i tried moving xmlns:myapp relativelayout, didn't change anything....
also, i've made first live ad request on 24 hours ago...
edit
ok, i'm getting somewhere, i've managed test ads showing (my settestdevices late in oncreate code, pushed first lines), not real ones... missing something? commented out settestdevices line , no ads show up
edit 2
well, added 2 internal ads (i had internal ads enabled, no internal ads set), , ads started showing on app (not internal ads).
i guess altogether made work?! :)
thanks everyone!
you aren't positioning ad's in relativelayout (they need layout_above or layout_below or whatever specify put them).
also there minimum size admob might want ensure match, think it's 48dip in height @ least, not sure horizontal is.
lastly don't know trying place ad's, make more sense in main frame-layout, have padding @ bottom of app use ad-view.
edit: if app public check ad-revenue. android pre 2.3 allowed ad's hidden behind views , still register clicks. made initial $1 before ad's visible anyone.
Comments
Post a Comment