I am integrating AdMob into my app and I wonder how to disable Ads correctly. I want to give the user the ability to disable them. I don\'t want to get any problems with AdM
In your layout file (eg, main.xml) :
Then in your code (eg, inside a "if" block)
(LinearLayout) adscontainer = (LinearLayout) findViewById(R.id.adsContainer);
View admobAds = (View) findViewById(R.id.admobAds);
adscontainer.removeView(admobAds);
This will "permanently" (for the lifecycle of the app) remove the ads from the layou, which means that there will not be any ads requested.