Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1105903
  • 博文数量: 276
  • 博客积分: 8317
  • 博客等级: 少将
  • 技术积分: 2329
  • 用 户 组: 普通用户
  • 注册时间: 2006-09-12 08:17
个人简介

http://ads.buzzcity.net/adpage.php?partnerid=40096

文章分类

全部博文(276)

文章存档

2013年(1)

2012年(38)

2011年(102)

2010年(85)

2009年(45)

2008年(5)

分类: 嵌入式

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 { public (android.content.Context); public (android.content.Context, android.util.AttributeSet); public (android.content.Context, android.util.AttributeSet, int); public void set*(...); }-keepclassmembers class *{ public void *(android.view.View); }

You can copy these code into the end of your proguard.cfg file. Remember to delete the comment line which starts with “#”.

阅读(897) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~