Commit 6416406f authored by mengcuiguang's avatar mengcuiguang

添加gromore sdk

parent 17ae2018
...@@ -215,10 +215,6 @@ dependencies { ...@@ -215,10 +215,6 @@ dependencies {
implementation 'cn.jiguang.sdk:jcore:2.3.8' implementation 'cn.jiguang.sdk:jcore:2.3.8'
// 移动安全联盟 // 移动安全联盟
implementation(name: 'oaid_sdk_1.0.23', ext: 'aar') implementation(name: 'oaid_sdk_1.0.23', ext: 'aar')
// 穿山甲广告 版本3.4.1.2
implementation(name: 'open_ad_sdk', ext: 'aar')
// 广点通广告 腾讯
implementation(name: 'GDTSDK.unionNoPlugin.4.294.1164', ext: 'aar')
// shareSdk // shareSdk
implementation project(':shareSdkLib') implementation project(':shareSdkLib')
// 应用管理中心分包 // 应用管理中心分包
...@@ -363,5 +359,13 @@ dependencies { ...@@ -363,5 +359,13 @@ dependencies {
// androidTestImplementation 'androidx.test.ext:junit:1.1.2' // androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' // androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// 穿山甲 GroMore
// mediation_ad_sdk
implementation(name: 'mediation_ad_sdk_2.7.1.2', ext: 'aar')
// mediation_ad_sdk adapter
implementation(name: 'gdt_adapter_4.351.1221.1', ext: 'aar')
// 穿山甲广告
implementation(name: 'open_ad_sdk_3.6.1.3', ext: 'aar')
// 广点通广告 腾讯
implementation(name: 'GDTSDK.unionNormal.4.351.1221', ext: 'aar')
} }
...@@ -799,5 +799,50 @@ ...@@ -799,5 +799,50 @@
-keep class com.mdad.sdk.mduisdk.shouguan.** { *; } -keep class com.mdad.sdk.mduisdk.shouguan.** { *; }
# ======================= 愉悦赚 END ================ # ======================= 愉悦赚 END ================
# ======================= 芒果 START ================
# ======================= 芒果 END ================
\ No newline at end of file
# ======================= 穿山甲 GroMore START ================
#pangle
-keep class com.bytedance.sdk.openadsdk.** { *; }
-keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
-keep class com.pgl.sys.ces.* {*;}
//聚合混淆
-keep class bykvm*.**
-keep class com.bytedance.msdk.adapter.**{ public *; }
-keep class com.bytedance.msdk.api.** {
public *;
}
-keep class com.bytedance.msdk.base.TTBaseAd{*;}
-keep class com.bytedance.msdk.adapter.TTAbsAdLoaderAdapter{
public *;
protected <fields>;
}
# baidu sdk 不接入baidu sdk可以不引入
-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.** {*;}
# Admob 不接入admob sdk可以不引入
-keep class com.google.android.gms.ads.MobileAds {
public *;
}
#sigmob 不接入sigmob sdk可以不引入
-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keep public class * extends android.support.v4.**
-keep class sun.misc.Unsafe { *; }
-dontwarn com.sigmob.**
-keep class com.sigmob.**.**{*;}
# ======================= 穿山甲 GroMore END ================
\ No newline at end of file
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
tools:replace="android:authorities"> tools:replace="android:authorities">
<meta-data <meta-data
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" android:resource="@xml/pangle_file_paths"
tools:replace="android:resource" /> tools:replace="android:resource" />
</provider> </provider>
...@@ -380,11 +380,6 @@ ...@@ -380,11 +380,6 @@
android:name="com.qq.e.comm.DownloadService" android:name="com.qq.e.comm.DownloadService"
android:exported="false" /> android:exported="false" />
<!--小滿廣告-->
<activity
android:name="com.qq.e.tg.ADActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
<activity <activity
android:name="com.qq.e.ads.ADActivity" android:name="com.qq.e.ads.ADActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" /> android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
......
package com.mints.goodmoney.manager
import com.mints.goodmoney.MintsApplication
object CsjGroMoreManager {
fun init(){
TTGroMoreAdManagerHolder.init(MintsApplication.getContext())
}
}
\ No newline at end of file
package com.mints.goodmoney.manager;
import android.app.Activity;
import android.content.Context;
import android.provider.Settings;
import com.bytedance.msdk.api.TTAdConfig;
import com.bytedance.msdk.api.TTAdConstant;
import com.bytedance.msdk.api.TTMediationAdSdk;
import com.bytedance.msdk.api.UserInfoForSegment;
import java.util.HashMap;
import java.util.Map;
/**
* 可以用一个单例来保存TTAdManager实例,在需要初始化sdk的时候调用
*/
public class TTGroMoreAdManagerHolder {
private static boolean sInit;
public static void init(Context context) {
doInit(context);
}
public static void initUnitySdkBanner(Activity activity) {
TTMediationAdSdk.initUnityForBanner(activity);
}
//step1:接入网盟广告sdk的初始化操作,详情见接入文档和穿山甲平台说明
private static void doInit(Context context) {
if (!sInit) {
TTMediationAdSdk.initialize(context, buildConfig(context));
sInit = true;
}
}
private static TTAdConfig buildConfig(Context context) {
UserInfoForSegment userInfo = new UserInfoForSegment();
userInfo.setUserId("msdk demo");
userInfo.setGender(UserInfoForSegment.GENDER_UNKNOWN);
userInfo.setChannel("msdk channel");
userInfo.setSubChannel("msdk sub channel");
userInfo.setAge(999);
userInfo.setUserValueGroup("msdk demo user value group");
Map<String, String> customInfos = new HashMap<>();
customInfos.put("aaaa", "test111");
customInfos.put("bbbb", "test222");
userInfo.setCustomInfos(customInfos);
return new TTAdConfig.Builder()
.appId("5001121") //必填 ,不能为空
.appName("APP测试媒体") //必填,不能为空
.openAdnTest(false)//开启第三方ADN测试时需要设置为true,会每次重新拉去最新配置,release 包情况下必须关闭.默认false
.isPanglePaid(false)//是否为费用户
.setPublisherDid(getAndroidId(context)) //用户自定义device_id
.openDebugLog(true) //测试阶段打开,可以通过日志排查问题,上线时去除该调用
.usePangleTextureView(true) //使用TextureView控件播放视频,默认为SurfaceView,当有SurfaceView冲突的场景,可以使用TextureView
.setPangleTitleBarTheme(TTAdConstant.TITLE_BAR_THEME_DARK)
.allowPangleShowNotify(true) //是否允许sdk展示通知栏提示
.allowPangleShowPageWhenScreenLock(true) //是否在锁屏场景支持展示广告落地页
.setPangleDirectDownloadNetworkType(TTAdConstant.NETWORK_STATE_WIFI, TTAdConstant.NETWORK_STATE_3G) //允许直接下载的网络状态集合
.needPangleClearTaskReset()//特殊机型过滤,部分机型出现包解析失败问题(大部分是三星)。参数取android.os.Build.MODEL
.setUserInfoForSegment(userInfo) // 设置流量分组的信息
.build();
}
public static String getAndroidId(Context context) {
String androidId = null;
try {
androidId = Settings.System.getString(context.getContentResolver(), Settings.System.ANDROID_ID);
} catch (Exception e) {
e.printStackTrace();
}
return androidId;
}
}
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path name="tt_external_root" path="." />
<external-path name="tt_external_download" path="Download" />
<external-files-path name="tt_external_files_download" path="Download" />
<files-path name="tt_internal_file_download" path="Download" />
<cache-path name="tt_internal_cache_download" path="Download" />
</paths>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment