I am having some CPU usage when my app is backgrounded and the only message I am receiving at Logcat is coming from Adview with the typical:
\"Ad is n
I was able to get this working . in my mainactivity have method call as below :
private void checkAdd() {
mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("8C7A47B9F0F8147BAD75D7DB4C2D026E") // Will your Test device id.
.build();
mAdView.loadAd(adRequest);
}
@Override
protected void onPause() {
mAdView.pause();
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
if(mAdView!=null){ // Check if Adview is not null in case of fist time load.
mAdView.resume();}
}
I think you only need adView.pause();
in onPause()
method:
@Override
protected void onPause() {
adView.pause();
super.onPause();
}
and adView.resume();
in onResume()
method:
@Override
protected void onResume() {
super.onResume();
adView.resume();
}
Update: I think is an issue reported to google: https://groups.google.com/forum/#!topic/google-admob-ads-sdk/jz-ZQh86lm0