Test interstitial not showing with signed app on emulator

344 views
Skip to first unread message

Royston Carter

unread,
Nov 1, 2014, 11:49:46 AM11/1/14
to google-adm...@googlegroups.com
We have found that when doing testing of signed (and Proguard obfuscated) apps, Interstitials do not show on Emulators. We have a signed app with Proguard obfuscation as per the settings below and have  builder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR) set. When this is run on an emulator, interstitials will not show. The first attempt to show an interstitial produces nothing on the emulator and generates the log cat messages as sown below. Subsequent attempts to display an interstitial report Ad already showing! It would appear that live ads display OK and live and test ads show ok on real devices.

Proguard:

# The following is required for Google Ad Mob

-keep public class com.google.android.gms.ads.** {

   public *;

}

-keep public class com.google.ads.** {

   public *;

}


-keep public class com.google.ads.mediation.** {

   public *;

}



Logcat;

11-01 11:46:53.578: I/Ads(2220): Ad finished loading.
11-01 11:46:53.578: D/GoogleAdManager(2220): loadInterstitial: onAdLoaded
11-01 11:46:53.578: D/GoogleAdManager(2220): showInterstitial:
11-01 11:46:53.578: D/ActivityMahjong(2220): onPause:
11-01 11:46:53.578: I/ActivityManager(1211): START u0 {flg=0x80000 cmp=com.ta_dah_apps.shisen_sho_free/com.google.android.gms.ads.AdActivity (has extras)} from pid 2220
11-01 11:46:53.578: W/WindowManager(1211): Screenshot failure taking screenshot for (230x143) to layer 21015
11-01 11:46:53.608: W/Ads(2220): Could not get info for ad overlay.
11-01 11:46:53.608: D/ActivityMahjong(2220): onWindowFocusChanged:
11-01 11:46:53.618: D/ActivityMahjong(2220): onWindowFocusChanged:
11-01 11:46:53.618: W/InputMethodManagerService(1211): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b129db68 attribute=null, token = android.os.BinderProxy@b1462250
11-01 11:46:53.638: D/ActivityMahjong(2220): onResume:

Royston Carter

unread,
Nov 4, 2014, 5:21:28 PM11/4/14
to google-adm...@googlegroups.com
I believe I have resolved this myself, turns out to be a Proguard issue.

Eric Leichtenschlag

unread,
Nov 4, 2014, 6:24:45 PM11/4/14
to google-adm...@googlegroups.com
Please let the group know what you changed to get this working if you were able to pinpoint it.

If you're proguarding with the Google Play services library, you should also include the proguard rules from Google Play services: http://developer.android.com/google/play-services/setup.html#Proguard

Thanks,
Eric

Royston Carter

unread,
Nov 5, 2014, 3:58:54 AM11/5/14
to google-adm...@googlegroups.com
Eric,
It was indeed the Google Play services library Proguard setting that appear to have made the difference. I wrongly had assumed that Library Proguard setting would propagate up and be included in builds, another case of RTFM!

Regards

Roy
Reply all
Reply to author
Forward
0 new messages