Commit c15babcb authored by jyx's avatar jyx

更新gromoreSDK,更新短剧SDK

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