I recently added an ad using Admob in the Google Play services library (which is still pretty BTW buggy).
Interstitial mode works well, but the following call:
// Begin loading interstitial interstitial.loadAd(adInterstitialRequest);
very slow, it can delay up to 2 seconds of the first launch of my application.
What can I do to avoid this? I followed just such an example provided by Google here .
FYI I tried to load an ad in the background using AsyncTask , but this is not possible:
03-23 15:50:21.939: E/AndroidRuntime(3572): Caused by: java.lang.IllegalStateException: loadAd must be called on the main UI thread.
thanks
android google-play-services admob
Yoann hercouet
source share