title: Real Admob Ads Appearing When Setting Test Mode Programmatically
body: <p>Kind of a strange issue here: Whenever I set test mode via xml, I receive the expected test ads in my emulator. However, when I try to do the same programmatically, I seem to get real ads. According to the Admob documentation, these two methods should be equivalent, no? Here is my xml code:</p>
  
  <pre><code> &lt;com.google.ads.AdView
                      android:id="@+id/adView"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentLeft="true"
                      android:layout_alignParentTop="true"
                      ads:adSize="BANNER"
                      ads:adUnitId="xxxxxxxxxxx"
                      ads:loadAdOnCreate="true"&gt;
      &lt;/com.google.ads.AdView&gt;
  </code></pre>
  
  <p>And here is the relevant Java code:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      AdRequest adRequest = new AdRequest();
      adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
  
  }
  </code></pre>
  
  <p>As mentioned before, if I insert the line ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" into the above xml code, I get the test ad just fine. Any ideas?</p>