http://ads.buzzcity.net/adpage.php?partnerid=40096
分类: 嵌入式
2011-11-23 22:46:24
Android developer would be familiar with ProGuard which can increase the difficulty of Java de-compile. And adwhirl is a good tool for assembling many ad networks to increase the profit (just a saying, not silver bullet).
The problem is the default proguard configuration may crash the application embedded with adwhirl.
Here is the configuration I’ll use in adwhirl enabled app.
# shut down all the warnings in package adapters -dontwarn com.adwhirl.adapters.*# don't change the methods' name in default adapters -keep class com.adwhirl.** { *;} -keep public class com.adwhirl.adapters.AdMobAdapter {*;} -keep public class com.adwhirl.adapters.ZestAdzAdapter {*;} -keep public class com.adwhirl.adapters.MillennialAdapter {*;} -keep public class com.admob.android.ads.** {*;} -keep public class com.millennialmedia.android.** {*;} -keep public class com.zestadz.android.** {*;}# don't change the name of customized adwhirl handler's name, # in my case, it is the mobfoxBanner() -keepclassmembers class *{ public void mobfoxBanner(); }# and other lines are not necessary in many cases, # the default config has done part of this for us -keep public class * extends Android.view.View { publicYou can copy these code into the end of your proguard.cfg file. Remember to delete the comment line which starts with “#”.