// Edit your activity's layout XML file to include a
// RelativeLayout to contain the AdView:
...
// In your activity's onCreate function, construct the AdView,
// add to the container view and load the ad:
private AdView adView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
RelativeLayout adViewContainer = (RelativeLayout) findViewById(R.id.adViewContainer);
adView = new AdView(this, "1189133951143061_1224527747603681", AdSize.BANNER_320_50);
adViewContainer.addView(adView);
adView.loadAd();
}