@Override
  public void onDestroy() {
    adViewRectangle.destroy();
    adViewRectangle = null;

    super.onDestroy();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initialize status label
    statusLabel = getString(R.string.loading_status);

    adViewRectangle =
        new AdView(this.getActivity(), "YOUR_PLACEMENT_ID", AdSize.RECTANGLE_HEIGHT_250);

    // Set a listener to get notified on changes or when the user interact with the ad.
    adViewRectangle.setAdListener(this);

    // Initiate a request to load an ad.
    adViewRectangle.loadAd();
  }