UBIMAX 自定义接入优推 ADN SDK 说明文档
UBIMAX 自定义接入优推 ADN SDK 说明文档
参考链接:
优推ADN接入文档:
优推adn接入文档:https://lemon.gameley.com/flowdocs/
UBMIX自定义广告文档:
UBMIX提供的自定义广告平台文档:
https://alidocs.dingtalk.com/i/p/5YRBGvapJeygmDArkoz3p7ZYJ1eV7X6L
优推Adapter适配器源码和demo:
Android:https://gameley.coding.net/public/youtuiadsdk/adn_network_ubimax_aar/git/files
IOS:https://gameley.coding.net/public/youtuiadsdk/YouTuiAdSDKUBXAdapter/git/files
UBMIX自定义Adapter类继承类说明文档:
Android:https://alidocs.dingtalk.com/i/p/rkoz3odNQvKe9z6L/docs/m9bN7RYPWd7A9d7OFZp7vMqr8Zd1wyK0
IOS:https://alidocs.dingtalk.com/i/p/rkoz3odNQvKe9z6L/docs/QOG9lyrgJP5Zxn5MHLonlKyx8zN67Mw4
dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
implementation 'com.google.code.gson:gson:2.8.0'
//Glide
implementation 'com.github.bumptech.glide:glide:4.7.1'
//优推
implementation(name: 'adalliance_adn_sdk.${Version}', ext: 'aar')
}
dependencies {
implementation(name: 'yt-adapter-ubimax-1.0.0', ext: 'aar')
}
适配器地址:https://gameley.coding.net/public/youtuiadsdk/adn_network_ubimax_aar/git/files
1.2.iOS引入优推ADN SDK 和 UBIMAX适配器
pod 'YouTuiAdSDK'
pod 'YouTuiAdSDKTakuAdapter'
适配器地址:
https://gameley.coding.net/public/youtuiadsdk/YouTuiAdSDKUBXAdapter/git/files
Android 适配器路径不可被混淆。
适配器混淆配置
-keep class com.alliance.ssp.adapter.ubimax.** { *; }
类名如下表
初始化填写:
com.alliance.ssp.adapter.ubimax.custom.YTCustomerInitAdapter
开屏位置填写:
com.alliance.ssp.adapter.ubimax.custom.YTCustomerSplashAdapter
激励位置填写:
com.alliance.ssp.adapter.ubimax.custom.YTCustomerRewardAdapter
插屏位置填写:
com.alliance.ssp.adapter.ubimax.custom.YTCustomerInterstitialAdapter
信息流位置填写:
com.alliance.ssp.adapter.ubimax.custom.YTCustomerFeedAdapter
初始化:
YTCustomerInitAdapter
开屏位置填写:
YTCustomerSplashAdapter
激励位置填写:
YTCustomerRewardAdapter
插屏位置填写:
YTCustomerInterstitialAdapter
信息流位置填写:
YTCustomerFeedAdapter
2.1. iOS UBX适配器接入APP的时候注意事项
podfile文件中需要加入:
pod 'YouTuiAdSDKUBXAdapter'
pod 'UBiMAXAdSDK', '1.5.0'
# 开屏
pod 'UBiMAXSplash', '1.1.0'
# 信息流
pod 'UBiMAXNative', '1.1.1'
# 激励
pod 'UBiMAXRewardedVideo', '1.1.0'
# 插屏
pod 'UBiMAXInterstitial', '1.2.0'
pod 'UBiMAXDebuggerUI', '1.0.1'
pod 'UBiXMediationSDK', '2.12.2.11'
pod 'UBiXMUBiXAdapter', '2.10.0.11.0'
pod 'UBiMAXAdxAdapter', '2.12.2.11.0'
通过setExtraMap 进行配置
/**
*设置优推SDK自定义参数
*更多参数请参考 YTParams
* */
HashMap<String,String> extraMap = new HashMap<>();
//如果有接入微信SDK,可以设置为 1 支持微信小程序 0不支持。
extraMap.put(YTParams.USE_WX_MINI_PROGRAM,"0");
//如果有msa oaidSDK的证书时可以传入。传入assets目录下证书的完整路径。
extraMap.put(YTParams.CERT_PEM_PATH,"cert.pem");
//如果可以获取到oaid 可以设置获取到的oaid
extraMap.put(YTParams.CUSTOM_OAID,"提前获取Oaid后在此传入");
UMTInitConfig config = new UMTInitConfig.Builder()
.setAppId(AdConstants.appId)
.setDebug(true)
.setExtraMap(extraMap).build();
UMTSDK.setInitConfig(this, config);
UMTSDK.init(new UMTInitCallBack() {
@Override
public void onSucc() {
Log.e(TAG, "Init Success SDK version:" + UMTSDK.getSdkVersion());
}
@Override
public void onFail(int code, String msg) {
Log.e(TAG, "Init Fail code:" + code + " msg:" + msg);
}
});
