Commit c15babcb authored by jyx's avatar jyx

更新gromoreSDK,更新短剧SDK

parent 73ab8f8c
......@@ -210,18 +210,10 @@ dependencies {
// umeng 接入
// 穿山甲短剧
implementation("com.pangle.cn:pangrowth-sdk:3.9.0.2") {
exclude group: 'com.pangle.cn', module: 'pangrowth-game-sdk'
exclude group: 'com.pangle.cn', module: 'pangrowth-novel-sdk'
exclude group: 'com.pangle.cn', module: 'pangrowth-luckycat-sdk'
exclude group: 'com.pangle.cn', module: 'partner-luckycat-api-sdk'
exclude group: 'com.pangle.cn', module: 'pangrowth-reward-sdk'
exclude group: 'com.pangle.cn', module: 'partner-live-sdk'
exclude group: 'com.tencent.mm.opensdk', module: 'wechat-sdk-android'
}
implementation 'com.pangle.cn:pangrowth-djx-sdk:1.1.0.2'
// 穿山甲聚合 接入【穿山甲、快手】
implementation "com.pangle.cn:mediation-sdk:5.7.0.5"
implementation "com.pangle.cn:mediation-sdk:5.8.0.7"
// 腾讯播放器
implementation "com.tencent.liteav:LiteAVSDK_Player:11.3.0.13176"
......
......@@ -198,11 +198,10 @@
<!-- 短剧SDK -->
<provider
android:name="com.bytedance.sdk.dp.act.DPProvider"
android:authorities="${applicationId}.BDDPProvider"
android:name="com.bytedance.sdk.djx.act.DJXProvider"
android:authorities="${applicationId}.BDDJXProvider"
android:exported="false" />
<!-- 自有下载 -->
<provider
android:name="androidx.core.content.FileProvider"
......
......@@ -3,7 +3,8 @@
"site_id": "5433632",
"app_id": "540635",
"partner": "pangle_540635",
"secure_key": "80104f1bcd32f7b5780940bb9b6f438a"
"secure_key": "80104f1bcd32f7b5780940bb9b6f438a",
"secure_key_d": "2600266b17b080e7d941276c2389a842"
},
"feed": {
"news_list_ad_code_id": "",
......
......@@ -4,9 +4,9 @@ import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import com.bytedance.sdk.dp.DPDrama
import com.bytedance.sdk.dp.DPSdk
import com.bytedance.sdk.dp.IDPWidgetFactory
import com.bytedance.sdk.djx.DJXSdk
import com.bytedance.sdk.djx.IDJXService
import com.bytedance.sdk.djx.model.DJXDrama
import com.duben.speedplaylet.ad.express.ExpressManager
import com.duben.library.utils.json.JsonUtil
import com.duben.speedplaylet.common.AppConfig
......@@ -124,15 +124,15 @@ object LocalVedioManager {
// 请求穿山甲数据
private fun requestDrama(activity: Activity, data: VedioBean?) {
if (DPSdk.isStartSuccess() && data != null) {
DPSdk.factory().requestDrama(
arrayListOf(data.thirdId.toLong()), object : IDPWidgetFactory.DramaCallback {
if (DJXSdk.isStartSuccess() && data != null) {
DJXSdk.service().requestDrama(
arrayListOf(data.thirdId.toLong()), object : IDJXService.IDJXDramaCallback {
override fun onError(p0: Int, p1: String?) {
ToastUtil.show(activity, "网络错误!")
}
override fun onSuccess(
dataList: MutableList<out DPDrama>?,
dataList: MutableList<out DJXDrama>?,
info: MutableMap<String, Any>?
) {
dataList?.takeIf { it.isNotEmpty() }?.first()?.let {
......@@ -142,7 +142,6 @@ object LocalVedioManager {
bundle.putString(Constant.VEDIO_BEAN, JsonUtil.toJson(data))
readyGo(activity, DramaApiDetailActivity::class.java, bundle)
}
}
}
......
......@@ -4,13 +4,12 @@ import android.annotation.SuppressLint
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import android.widget.Toast
import com.bytedance.hume.readapk.HumeSDK
import com.bytedance.sdk.dp.DPDrama
import com.bytedance.sdk.dp.DPSdk
import com.bytedance.sdk.dp.IDPWidgetFactory
import com.bytedance.sdk.djx.DJXSdk
import com.bytedance.sdk.djx.IDJXService
import com.bytedance.sdk.djx.model.DJXDrama
import com.duben.speedplaylet.BuildConfig
import com.duben.speedplaylet.MintsApplication
import com.duben.speedplaylet.R
......@@ -97,30 +96,33 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
findViewById<TextView>(R.id.tv_about_address).setOnLongClickListener {
if (BuildConfig.DEBUG) {
if (DPSdk.isStartSuccess()) {
DPSdk.factory().requestAllDrama(
if (DJXSdk.isStartSuccess()) {
DJXSdk.service().requestAllDrama(
1,
Int.MAX_VALUE,
true,
object : IDPWidgetFactory.DramaCallback {
object : IDJXService.IDJXDramaCallback {
override fun onError(code: Int, msg: String?) {
Log.d("AboutusActivity", "request failed, code = $code, msg = $msg")
Toast.makeText(this@AboutusActivity, "请求失败", Toast.LENGTH_SHORT)
.show()
}
override fun onSuccess(
dataList: MutableList<out DPDrama>?,
dataList: MutableList<out DJXDrama>?,
info: MutableMap<String, Any>?
) {
Toast.makeText(this@AboutusActivity, "请求成功", Toast.LENGTH_SHORT)
.show()
val json = JsonUtil.toJson(dataList)
Log.d("AboutusActivity", "request success, drama = " + json)
Log.d("AboutusActivity", "request success, dataList size = " + dataList!!.size)
Log.d(
"AboutusActivity",
"request success, dataList size = " + dataList!!.size
)
TrackManager.getInstance().commitCsjShotInfo(json)
}
})
} else {
Toast.makeText(this@AboutusActivity, "sdk还未初始化", Toast.LENGTH_SHORT).show()
......
package com.duben.speedplaylet.video.csj
import android.content.Context
import android.util.Log
import com.bytedance.sdk.dp.DPSdk
import com.bytedance.sdk.dp.DPSdkConfig
import com.bytedance.sdk.djx.DJXSdk
import com.bytedance.sdk.djx.DJXSdkConfig
/**
* 穿山甲短剧SDK
......@@ -16,21 +15,22 @@ object DPHolderManager {
fun initDpSdk(context: Context) {
//1. 初始化,最好放到application.onCreate()执行
val configBuilder = DPSdkConfig.Builder().debug(true)
DPSdk.init(context, "SDK_Setting_5433632.json", configBuilder.build())
// 初始化,最好放到application.onCreate()执行
val config = DJXSdkConfig.Builder().build()
DJXSdk.init(context, "SDK_Setting_5433632.json", config)
startDpSdk()
}
fun startDpSdk() {
DPSdk.start { isSuccess, message ->
//需要在广告SDK初始化成功后启动短剧服务
DJXSdk.start { isSuccess, message ->
//请确保使用Sdk时Sdk已经成功启动
//isSuccess=true表示启动成功
//启动失败,可以再次调用启动接口(建议最多不要超过3次)
isDPStarted = isSuccess
Log.e(TAG, "start result=$isSuccess, msg=$message")
}
}
......
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