I have android application where I implemented AdMob ads.
My layout code is very simple - added AdView into LinearLayout:
<com.google.ads.AdView
android:id="@+id/adMob1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="{AdID}" />
In MyActivity in onCreate() method I am calling:
boolean showAdds = true;
if(this.showAdds) {
AdView adView = (AdView) findViewById(R.id.adMob1);
adView.loadAd(new AdRequest());
}
On some older android devices (tested for example on Samsung Galaxy S1) after AdMob implementation the app is very very slow. But when I set "showAdds" variable to "false" -> the loading of MyActivity is much better.
Is there any possibility to make the application with admob faster?
Thank you for all comments.
You cannot force Admob to give you better fill-rate. The best way to go if you're using Admob is to create multiple applications, and connect them through House Ads. That ways, even if your app is not getting ads, it is at least promoting your other apps, which leads to overall increase in your application downloads.
The amount an advertiser pays for each click on their ads. Advertisers set CPC bids to tell AdMob how much they're willing to pay for each click.
The AdMob advantage AdMob helps maximize revenue with more advertiser demand that helps drive high CPMs and fill rates globally. As a proven platform, our goal is not only to empower you to build sustainable revenue streams, but also to make your job easier with simple, yet powerful tools.
I too have been struggling with AdView increasing app load time. My solution was to move the ad code into a delay handler (within onCreate)…
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
adView.bringToFront();
}
}, 5000);
So now the app starts quickly and then after 5s the adview is loaded. (p.s. .bringToFront is used because my app layout uses a mixture of XML and code, so this stops adView from being hidden)
The adView loads a webview internally on first startup. It needs to create cookie stores etc. This will cost up to 2 seconds. If you load a webview before the adView it will benefit from it (maybe on your start up screen).
I found this hint here: https://groups.google.com/forum/#!topic/google-admob-ads-sdk/LdUVIZ2AW6M
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With