I am not receiving any ad even in test mode, also tried the sample
Lunar Lander example but that also didn't work.I have done everything
according to admob sdk instructions.Please help me out where i am
going wrong in this

 manifest file---

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
     package="com.infostretch.admob"
     android:versionCode="1"
     android:versionName="1.0">
   <application android:icon="@drawable/icon" android:label="@string/
app_name">
       <activity android:name=".AdMob"
                 android:label="@string/app_name">
           <intent-filter>
               <action android:name="android.intent.action.MAIN" />
               <category
android:name="android.intent.category.LAUNCHER" />
           </intent-filter>

       </activity>


       <meta-data android:value="a14d47fc0241fd1"
android:name="ADMOB_PUBLISHER_ID" />
        <meta-data android:value="true"
android:name="ADMOB_ALLOW_LOCATION_FOR_ADS" />

        <activity android:name="com.admob.android.ads.AdMobActivity"
               android:theme="@android:style/
Theme.NoTitleBar.Fullscreen"
               android:configChanges="orientation|keyboard|
keyboardHidden" />

 <receiver
android:name="com.admob.android.ads.analytics.InstallReceiver"
android:exported="true">
 <intent-filter>
  <action android:name="com.android.vending.INSTALL_REFERRER" />
 </intent-filter>
</receiver>

  </application>



   <uses-sdk android:minSdkVersion="5" />
 <uses-permission android:name="android.permission.INTERNET" />
</manifest>


////////////////////////////////////
attrs.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="com.admob.android.ads.AdView">
<attr name="backgroundColor" format="color" />
<attr name="primaryTextColor" format="color" />
<attr name="secondaryTextColor" format="color" />
<attr name="keywords" format="string" />
<attr name="refreshInterval" format="integer" />
</declare-styleable>
</resources>

//////////////////////////////////////////////////////////
main.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
 xmlns:myapp="http://schemas.android.com/apk/res/
com.infostretch.admob"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >

   <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"
 />
<TextView
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="@string/hello"
   />
</LinearLayout>

///////////////////////////////////////////////////////////////////////
admob activity



package com.infostretch.admob;



import com.admob.android.ads.AdManager;
import com.admob.android.ads.AdView;
import com.admob.android.ads.SimpleAdListener;
import com.admob.android.ads.ad;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class AdMob extends Activity {
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
       AdManager.setTestDevices( new String[] {
                     AdManager.TEST_EMULATOR});
       AdView ad=(AdView) findViewById(R.id.ad);
       ad.setAdListener ( new AdListener () );

   }


   class AdListener extends SimpleAdListener {
       @Override
       public void onFailedToReceiveAd ( AdView adView ) {
         // this is what logs
           Log.w ( "test-app", "failed to receive ad" );
           super.onFailedToReceiveAd ( adView );
       }

       @Override
       public void onFailedToReceiveRefreshedAd ( AdView adView ) {
           Log.w ( "test-app", "failed to receive refreshed ad" );
           super.onFailedToReceiveRefreshedAd ( adView );
       }

       @Override
       public void onReceiveAd ( AdView adView ) {
           Log.w ( "test-app", "receive ad" );
           super.onReceiveAd ( adView );
       }

       @Override
       public void onReceiveRefreshedAd ( AdView adView ) {
           Log.w ( "test-app", "receive refreshed ad" );
           super.onReceiveRefreshedAd ( adView );
       }
   }
}
//////////////////////////////////////////////////////////////////////////////////////
output of logcat

 INFO/AdMobSDK(437): AdMob SDK version is 20101109-
ANDROID-3312276cc1406347
 INFO/AdMobSDK(437): Publisher ID set to a14d47fc0241fd1
INFO/AdMobSDK(437): To get test ads on the emulator use
AdManager.setTestDevices( new String[] { AdManager.TEST_EMULATOR } )
 INFO/AdMobSDK(437): Making ad request in test mode
 INFO/ActivityManager(52): Displayed activity
com.infostretch.admob/.AdMob: 1940 ms (total 1940 ms)
 INFO/AdMobSDK(437): No fill.  Server replied that no ads are
available (701ms)
 WARN/test-app(437): failed to receive ad

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to