Reputation: 61646
Issue #1: In the tutorials, that I've looked at, a lot of folks place this line of code:
AdManager.setTestDevices( new String[] {AdManager.TEST_EMULATOR});
into the onCreate override of the activity. And sure enough, the test ad shows up.
Am I supposed to leave this line when I actually submit my app to the App Store? Won't it show a test ad when the users actually use my app?
Issue #2: I've also seen some examples where the code manually requests the ad:
AdView adView = (AdView) findViewById(R.id.ad);
adView.requestFreshAd();
Do I actually need these lines?
Unfortunately I don't have a device handy and can't test any of these assumptions?
Upvotes: 0
Views: 638
Reputation: 200160
Am I supposed to leave this line when I actually submit my app to the App Store? Won't it show a test ad when the users actually use my app?
You may want to delete that before submitting the app to the Market. It will not affect (that line affects emulators only, so the users will see real ads), but you won't need it either (refer to YAGNI principle).
Issue #2: I've also seen some examples where the code manually requests the ad:
You may need it for some special cases. For instance, if you are going to show your ad in a single activity, you won't need it. A couple of cases when it's useful:
requestFreshAd
of course :).Upvotes: 1