title: Right way to replace legacy ad unit IDs with new IDs
body: <p>I updated to a new AdMob and in "Here's what to do next" section of the new Admob, there is a guide: Replace legacy ad unit IDs with new IDs  (<a href="https://support.google.com/admob/v2/answer/6025739?hl=en" rel="nofollow">https://support.google.com/admob/v2/answer/6025739?hl=en</a>)</p>
  
  <p>In upgrade guide it says that you just need to "replace each of the legacy Publisher and Mediation IDs in your app with the corresponding new ad unit IDs".</p>
  
  <p>I have this code </p>
  
  <pre><code>        &lt;com.google.ads.AdView android:id="@+id/adView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          ads:adUnitId="a..."
          ads:adSize="SMART_BANNER"
          android:layout_alignParentBottom="true" /&gt;
  </code></pre>
  
  <p>and this </p>
  
  <pre><code>        adView = new AdView(this, AdSize.SMART_BANNER, "a...");
          RelativeLayout layout = (RelativeLayout)findViewById(R.id.adView);
          layout.addView(adView);
          adView.loadAd(new AdRequest());
  </code></pre>
  
  <p>Is it enough just to replace "a..." with new ad unit ID "ca-app-pub-...", because on Banners guide on Google developers website it says that this method is deprecated (<a href="https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals#android" rel="nofollow">https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals#android</a>).</p>
  
  <p>If I need to change code also, can you give me new code that would do the same as my code?</p>