title: Admob Banner Ad not displaying in Android
body: <p>Hi I have a Android game app developed using android cocos2d i need to integrate admob i have included the following code but banner ad is not displaying please help regarding this your answers will be appreciated and it would be a great help. thank you.</p>
  
  <pre><code>public class MainActivity extends Activity {
  private CCGLSurfaceView mGLSurfaceView;
  private boolean isCreated = false;
  public static FrameLayout m_rootLayout;
  AdView adView;
  
  // This is used to display Toast messages and is not necessary for your app
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      if (!isCreated) {
          isCreated = true;
      } else {
          return;
      }
  
      super.onCreate(savedInstanceState);
  
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
              WindowManager.LayoutParams.FLAG_FULLSCREEN);
      setContentView(R.layout.activity_main);
  
      try{
              LinearLayout.LayoutParams adParams = new LinearLayout.LayoutParams(
              getWindowManager().getDefaultDisplay().getWidth(),
              getWindowManager().getDefaultDisplay().getHeight()+getWindowManager().getDefaultDisplay().getHeight()-50);
  
              adView = new AdView(this, AdSize.BANNER, "admob id");
  
              AdRequest request = new AdRequest();
              adView.loadAd(request);
              // Adding full screen container
              addContentView(adView, adParams);
              }catch (Exception e) {
              FlurryAgent.logEvent("ADMOB ERROR: "+e);
              }
  
  
  
      mGLSurfaceView = new CCGLSurfaceView(this);
      setContentView(mGLSurfaceView);
  
  
      CCDirector.sharedDirector().attachInView(mGLSurfaceView);
  
      getScaledCoordinate();
  
      Global.assetManager = getAssets();
      Global.context = this;
      Global.loadUserInfo();
      CCScene scene = CCScene.node();
      scene.addChild(new SplashScene(), -1);
  
      CCDirector.sharedDirector().runWithScene(scene);
  
  
      //-------------IAP-----------------------
      Log.d(TAG1, "Creating IAB helper.");
          mHelper = new IabHelper(this, base64EncodedPublicKey);
          mHelper.enableDebugLogging(true);
          Log.d(TAG1, "Starting setup.");
          mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
              public void onIabSetupFinished(IabResult result) {
                  Log.d(TAG, "Setup finished.");
  
                  if (!result.isSuccess()) {
                      // Oh noes, there was a problem.
                      complain("Problem setting up in-app billing: " + result);
                      return;
                  }
  
                  // Hooray, IAB is fully set up. Now, let's get an inventory of stuff we own.
                  Log.d(TAG, "Setup successful. Querying inventory.");
                  mHelper.queryInventoryAsync(mGotInventoryListener);
              }
          });
  
  
          Global.myActivity=this;
  }
  </code></pre>
  
  <p>manifest </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.game.puzzlegame"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="17" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  &lt;uses-permission android:name="com.android.vending.BILLING" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.game.puzzlegame.MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="com.revmob.ads.fullscreen.FullscreenActivity"
          android:configChanges="keyboardHidden|orientation" &gt;
      &lt;/activity&gt;
  
      &lt;activity android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"&gt;&lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>