Commit 8d654376 authored by mengcuiguang's avatar mengcuiguang

添加优量汇信息流

parent ca56df1e
...@@ -45,10 +45,6 @@ object YlhPreLoadExpressManager { ...@@ -45,10 +45,6 @@ object YlhPreLoadExpressManager {
// 如果您在平台上新建平台模板2.0广告位时,选择了支持视频,那么可以进行个性化设置(可选) // 如果您在平台上新建平台模板2.0广告位时,选择了支持视频,那么可以进行个性化设置(可选)
val builder = VideoOption2.Builder() val builder = VideoOption2.Builder()
/**
* 如果广告位支持视频广告,强烈建议在调用loadData请求广告前设置setAutoPlayPolicy,有助于提高视频广告的eCPM值 <br/>
* 如果广告位仅支持图文广告,则无需调用
*/
/** /**
* 如果广告位支持视频广告,强烈建议在调用loadData请求广告前设置setAutoPlayPolicy,有助于提高视频广告的eCPM值 <br></br> * 如果广告位支持视频广告,强烈建议在调用loadData请求广告前设置setAutoPlayPolicy,有助于提高视频广告的eCPM值 <br></br>
* 如果广告位仅支持图文广告,则无需调用 * 如果广告位仅支持图文广告,则无需调用
...@@ -68,7 +64,6 @@ object YlhPreLoadExpressManager { ...@@ -68,7 +64,6 @@ object YlhPreLoadExpressManager {
mNativeExpressADData2?.destroy() mNativeExpressADData2?.destroy()
if (adDataList.size > 0) { if (adDataList.size > 0) {
mNativeExpressADData2 = adDataList[0] mNativeExpressADData2 = adDataList[0]
mNativeExpressADData2?.getECPMLevel() + " Video duration: " + mNativeExpressADData2?.getVideoDuration()
mNativeExpressADData2?.setAdEventListener(object : AdEventListener { mNativeExpressADData2?.setAdEventListener(object : AdEventListener {
override fun onClick() { override fun onClick() {
} }
......
...@@ -18,8 +18,8 @@ import org.json.JSONObject ...@@ -18,8 +18,8 @@ import org.json.JSONObject
object CpdManager { object CpdManager {
/*单个任务id*/ /*单个任务id*/
const val BUSINESS_ID = "" const val BUSINESS_ID = "m8919"
const val KEY = "" const val KEY = "TUlFv8gY2wNSF6eGnzKNXMo6xADUa8dD"
/*列表任务id*/ /*列表任务id*/
const val BUSINESS_ID_LIST = "" const val BUSINESS_ID_LIST = ""
......
...@@ -74,7 +74,8 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -74,7 +74,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
private val outNetIp by lazy { SPUtil.getInstance().getString(Constant.OUT_NET_IP) } private val outNetIp by lazy { SPUtil.getInstance().getString(Constant.OUT_NET_IP) }
private var mCoin = 0 private var shCoin = 0
private var sydCoin = 0
private var needUseTime = -1// 应用试玩时间 private var needUseTime = -1// 应用试玩时间
private var shMax = 0 //珊瑚 广告最大填充数 private var shMax = 0 //珊瑚 广告最大填充数
...@@ -140,7 +141,8 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -140,7 +141,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
override fun getShCpdTimeSuc(time: Int, coin: Int, CPD: Int, CPD_SYD: Int, CPD_ORDER: String?) { override fun getShCpdTimeSuc(time: Int, coin: Int, CPD: Int, CPD_SYD: Int, CPD_ORDER: String?) {
needUseTime = time needUseTime = time
mCoin = coin shCoin = coin
sydCoin = coin
shMax = CPD shMax = CPD
cpdMax = CPD_SYD cpdMax = CPD_SYD
...@@ -239,7 +241,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -239,7 +241,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
continue continue
} }
val tzTaskBean = TzTaskBean(material.icons, material.description, material.title, false, mCoin, 0, material.app_apk_name) val tzTaskBean = TzTaskBean(material.icons, material.description, material.title, false, sydCoin, 0, material.app_apk_name)
tzTaskBean.app_url = material.app_url tzTaskBean.app_url = material.app_url
tzTaskBean.trackerBean = material.tracker tzTaskBean.trackerBean = material.tracker
mFakeTaskList.add(tzTaskBean) mFakeTaskList.add(tzTaskBean)
...@@ -288,7 +290,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -288,7 +290,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
continue continue
} }
val tzTaskBean = TzTaskBean(material.icons, material.app_name, material.description, false, mCoin, 0, material.app_apk_name) val tzTaskBean = TzTaskBean(material.icons, material.app_name, material.description, false, sydCoin, 0, material.app_apk_name)
tzTaskBean.app_url = material.app_url tzTaskBean.app_url = material.app_url
tzTaskBean.trackerListBean = material.tracker tzTaskBean.trackerListBean = material.tracker
mFakeTaskList.add(tzTaskBean) mFakeTaskList.add(tzTaskBean)
...@@ -440,7 +442,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -440,7 +442,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
LogUtil.d(TAG, "shanhu onLoadSuccess times") LogUtil.d(TAG, "shanhu onLoadSuccess times")
dataList?.let { dataList?.let {
for (coralAD in it) { for (coralAD in it) {
val tzTaskBean = TzTaskBean(coralAD.icon, coralAD.title, coralAD.description, true, mCoin, 0, null) val tzTaskBean = TzTaskBean(coralAD.icon, coralAD.title, coralAD.description, true, shCoin, 0, null)
tzTaskBean.coralAd = coralAD tzTaskBean.coralAd = coralAD
mFakeTaskList.add(tzTaskBean) mFakeTaskList.add(tzTaskBean)
} }
...@@ -538,11 +540,12 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -538,11 +540,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
} }
2 -> { 2 -> {
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, mCoin)
mTaskAdapter?.let { mTaskAdapter?.let {
if (mFakeTaskList[it.getPosition()].isShCpd) { if (mFakeTaskList[it.getPosition()].isShCpd) {
bundle.putInt(Constant.MAIN_CUR_COIN, shCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_CPD) bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_CPD)
} else { } else {
bundle.putInt(Constant.MAIN_CUR_COIN, sydCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_CPD_SYD) bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_CPD_SYD)
} }
} }
...@@ -582,7 +585,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -582,7 +585,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
if (mFakeTaskList[position].isShCpd) { if (mFakeTaskList[position].isShCpd) {
taskDialog = TaskDialog(requireActivity()) taskDialog = TaskDialog(requireActivity())
taskDialog?.show() taskDialog?.show()
taskDialog?.setData(mFakeTaskList[position].coralAd, needUseTime, mCoin) taskDialog?.setData(mFakeTaskList[position].coralAd, needUseTime, shCoin)
} else { } else {
taskCpdDialog = TaskCpdDialog(requireActivity(), object : DialogListener() { taskCpdDialog = TaskCpdDialog(requireActivity(), object : DialogListener() {
override fun onClick(v: View?) { override fun onClick(v: View?) {
...@@ -598,7 +601,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -598,7 +601,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
DownloadApkManager.downloadApk(requireActivity(), mFakeTaskList[position].app_url, mFakeTaskList[position].downLoadPkgName) DownloadApkManager.downloadApk(requireActivity(), mFakeTaskList[position].app_url, mFakeTaskList[position].downLoadPkgName)
} }
}) })
taskCpdDialog?.setData(mFakeTaskList[position].title, mFakeTaskList[position].description, mFakeTaskList[position].icon, needUseTime, mCoin) taskCpdDialog?.setData(mFakeTaskList[position].title, mFakeTaskList[position].description, mFakeTaskList[position].icon, needUseTime, sydCoin)
taskCpdDialog?.show() taskCpdDialog?.show()
} }
} }
......
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