setTesting(boolean) from the type AdRequest is deprecated

Admob testing on emulator issue.
Android Eclipse code warning:
setTesting(boolean) from the type AdRequest is deprecated
Solution:
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);

AdView adView = new AdView(this, AdSize.BANNER, "a14d9..........");//MY_AD_UNIT_ID
AdRequest adRequest = new AdRequest();
		adRequest.setTesting(true); // deprecated
 
		adRequest.addTestDevice(AdRequest.TEST_EMULATOR); // OK
		adView.loadAd(adRequest);
This entry was posted in Android Examples Code and tagged , , . Bookmark the permalink.


Comments are closed.



3,033 views