TopOn广告

模块引入

app目录build.gradle中修改

  xxxxxImplementation WB.fixVersions('AD:TopOn')

注意事项

1、TopOn需要在项目的app目录下的build.gradle配置首次开屏参数

2、一个广告id同一时间只有一个广告,如果有多个广告位使用同一个id,返回的状态都是一样的。
一个广告位展示了广告,所有使用该广告id的广告位调用isAdReady方法返回的状态都会是false。

广告配置

build.gradle配置分渠道的内容如下示例:

manifestPlaceholders = [
    ...
    Topon_Splash_Appid:           "xxxx",  //广告源的应用ID
    Topon_Splash_PlacementId:     "xxxx",  //广告源的广告位ID
    Topon_Splash_AdsourceId:      "xxxx",  //TopOn广告源ID
    Topon_Splash_Template:        "0",  //穿山甲专用,开屏是否为模板渲染类型,"1":模板渲染、"0":非模板渲染
    Topon_Splash_Sourcetype:      "qq",  //广告源平台类型:toutiao-头条,qq-腾讯,kuaishou-快手,baidu-百度
    ...
]

混淆过滤

-keep class com.bytedance.sdk.openadsdk.** { *; }
-keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
-keep class com.pgl.sys.ces.* {*;}
-keep class org.chromium.** {*;}
-keep class org.chromium.** { *; }
-keep class aegon.chrome.** { *; }
-keep class com.kwai.**{ *; }
-dontwarn com.kwai.**
-dontwarn com.kwad.**
-dontwarn com.ksad.**
-dontwarn aegon.chrome.**

# androidx

-keep class com.google.android.material.** {*;}
-keep class androidx.** {*;}
-keep public class * extends androidx.**
-keep interface androidx.** {*;}
-dontwarn com.google.android.material.**
-dontnote com.google.android.material.**
-dontwarn androidx.**

# android.support.v4

-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keep public class * extends android.support.v4.**

# WindAd

-keep class sun.misc.Unsafe { *; }
-dontwarn com.sigmob.**
-keep class com.sigmob.**.**{*;}

# miitmdid

-keep class com.bun.** {*;}
-dontwarn com.bun.**

-keep, includedescriptorclasses class com.asus.msa.SupplementaryDID.** { *; }
-keepclasseswithmembernames class com.asus.msa.SupplementaryDID.** { *; }
-keep, includedescriptorclasses class com.asus.msa.sdid.** { *; }
-keepclasseswithmembernames class com.asus.msa.sdid.** { *; }
-keep public class com.netease.nis.sdkwrapper.Utils {public <methods>;}
-keep class com.samsung.android.deviceidservice.**{*;}
-keep class a.**{*;}
-keep class com.qq.e.** {
    public protected *;
}
-keep class android.support.v4.**{
    public *;
}
-keep class android.support.v7.**{
    public *;
}
-keep class MTT.ThirdAppInfoNew {
    *;
}
-keep class com.tencent.** {
    *;
}
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.mintegral.** {*; }
-keep interface com.mintegral.** {*; }
-keep class android.support.v4.** { *; }
-dontwarn com.mintegral.**
-keep class **.R$* { public static final int mintegral*; }
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class com.baidu.mobads.** { *; }
-keep class com.baidu.mobad.** { *; }
-keep class com.bun.miitmdid.core.** {*;}


-keep class com.libAD.ADAgents.TopOnSplash { *; }

集成测试

通过过滤TopOn日志查看广告状态,或者直接通过弹出的广告进行判断

如果需要更加详细的log可以在assets目录下添加 topon_ad_info.xml文件 配置log标签参数开启topon广告平台自己的debug信息

log标签为true:开启,false:关闭

<?xml version="1.0" encoding="utf-8"?>
<data>
    <log>true</log>
</data>

最后更新于