Saturday, 14 September 2013

Google ads in android app

Google ads in android app

I am working with adding Google ads in android apps... my code is as follows
adView = new AdView(this, AdSize.SMART_BANNER, "xxxxxxxxxx");
LinearLayout layout = (LinearLayout)findViewById(R.id.mainlayout);
layout.addView(adView);
AdRequest ads=new AdRequest();
ads.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(ads);
all is working fine on emulator but doesn't show ads on my device please
suggest me what i'm doing wrong here

No comments:

Post a Comment