0

When I run my app from within Eclipse, all works brilliantly. Ads show up and refresh without any issues. (I've integrated the MobFox SDK and am receiving AdMob and MobFox ads via it.

However, when I sign my app with my private keystore and export it, then install the APK onto my device, AdMob ads do not appear to.....well, appear.

Am I missing something? I've re-tested by running it directly from Eclipse, and once again, it works from there.

Is there something in my code that I need to change before exporting or perhaps it's something to do with the keystore (I was previously using the debug keystore to test my Google Play Game Services).

Would appreciate any thoughts as I'm not really sure what I'm missing here.

Zippy
  • 3,826
  • 5
  • 43
  • 96

2 Answers2

2

It was Proguard causing the problem!

If anyone out there is using MobFox as their Ad Network, the following should be added to your proguard-project.txt (This information doesn't seem to appear in their intergration instructions at time of writing).

-keep class com.adsdk.** { *; }

-keep class com.adsdk.sdk.** { *;

-keep class com.adsdk.sdk.video.** { *; }

-keep class com.mobfox.** { *; }

-keep class com.mobfox.adapter.** {*;}

-keep class com.mobfox.sdk.** {*;}

-keep class com.mobfox.sdk.data.** {*;}

-keep class com.mobfox.video.** {*;}

Zippy
  • 3,826
  • 5
  • 43
  • 96
0

Did you create a new client id for the production version of your app? If you were testing with the debug version then the SHA1 key will be different with your signed application since you used your own keystore.

In the google API console just create a new client id with the SHA1 key from the keystore you used to sign your application.

Developer Paul
  • 1,502
  • 2
  • 13
  • 18
  • Hi @DeveloperPaul, yeah, I hadn't done that, but have now - and I've published my app to Alpha on the Play store so it's available to my testers. Do I need to change anything in my code? Does AdMob use the keystore somehow - if it does, how do I inform it that I am now using a private keystore and not the debug one? I've confirmed that now, having created a 2nd Client ID, the Play Services (ie, Leaderboards) are working, it's just the Ads. Thanks!! – Zippy Jul 19 '14 at 01:53
  • I've also tried exporting with the debug.keystore and it also displays no Ads from AdMob. Again, I run it directly from within Eclipse and all is working. Any ideas? – Zippy Jul 19 '14 at 02:32