Such garbage: put advertising in the application (AdMob 6.3.0.), According to all the rules ..
@Override public void onResume() { super.onResume(); if(adView == null) { // Create the adView adView = new AdView(this, AdSize.BANNER,LabelsShow.AD_UNIT_ID_GOES_HERE); // Lookup your LinearLayout assuming it's been given // the attribute android:id="@+id/mainLayout" LinearLayout layout = (LinearLayout)findViewById(R.id.l_eadds); // Add the adView to it layout.addView(adView); // Initiate a generic request to load it with an ad adView.loadAd(new AdRequest()); } }
xml:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:id="@+id/l_eadds" android:background="@drawable/bgg" android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="53dip" android:background="@drawable/bg_fill"> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent"> <EditText android:layout_width="fill_parent" android:layout_height="47dp" android:text="" android:id="@+id/editText" android:layout_toRightOf="@+id/textView" android:layout_alignParentTop="true" android:layout_marginTop="6dp" android:layout_marginLeft="6dp" android:layout_marginBottom="3dp" android:layout_weight="1" android:drawableLeft="@drawable/e"/> <Button android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/search" android:id="@+id/look" android:layout_alignParentLeft="true" android:layout_alignBaseline="@+id/textView" android:layout_marginLeft="6dp" android:minWidth="100dip" android:background="@drawable/btn_no" android:layout_marginRight="6dp" android:layout_marginTop="6dp" android:layout_marginBottom="6dp"/> </TableRow> </LinearLayout> <WebView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/webView" android:layout_gravity="center" android:layout_alignParentBottom="true" android:layout_below="@+id/look"> <requestFocus /> </WebView> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="E" android:id="@+id/textViewik" android:layout_alignParentLeft="true" android:layout_marginLeft="11dp" android:layout_alignParentTop="true" android:layout_marginTop="19dp"/> </LinearLayout>
And the problem is very unusual: the fact is that on some devices, advertising is not shown. Checked on 4 devices. 2 on Android 2.3. and 2 on Android 4.0. On devices with Android 4.0. advertising works flawlessly. At 2.3. Activation at first a little tupit, and then appears: and there is no advertising. Just an empty area with nothing. What could be the problem? In other applications, advertising is.