Commit a2108684 authored by mengcuiguang's avatar mengcuiguang

每日任务添加奖励领取

parent 77018fd6
...@@ -251,6 +251,9 @@ dependencies { ...@@ -251,6 +251,9 @@ dependencies {
implementation(name: 'scenead-2.1', ext: 'aar') implementation(name: 'scenead-2.1', ext: 'aar')
implementation 'com.just.agentweb:agentweb:4.1.2' implementation 'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成 // 喜马拉雅 已集成
// 巨量引擎 暂不接入
// implementation 'com.bytedance.applog:RangersAppLog-Lite-cn-3.3.12.aar'
// testImplementation 'junit:junit:4.13' // testImplementation 'junit:junit:4.13'
......
//package com.mints.goodmoney.manager
//
//import android.app.Application
//import android.text.TextUtils
//import com.bytedance.embedapplog.AppLog
//import com.bytedance.embedapplog.InitConfig
//import com.bytedance.embedapplog.util.UriConfig
//import com.bytedance.hume.readapk.HumeSDK
//import com.mints.goodmoney.BuildConfig
//import com.mints.goodmoney.MintsApplication
//import com.mints.library.utils.CommonUtils
//
///**
// * 描述:巨量引擎
// */
//object TouTiaoRangersManager {
//
// private const val APP_ID = "203759"
//
// /**
// * 初始化
// *
// * 只有头条分包才初始化
// */
// fun init(application: Application) {
// try {
// var channel = CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME")
// if (channel.contains(ChannelManager.CHANNEL_TOUTIAO)) {
// // 穿山甲分包渠道
// val ttChannel = HumeSDK.getChannel(MintsApplication.getContext())
// if (!TextUtils.isEmpty(ttChannel)) {
// // appid和渠道,appid须保证与广告后台申请记录一致,渠道可自定义,如有多个马甲包建议设置渠道号唯一标识一个马甲包。
// val config = InitConfig(APP_ID, channel + "_" + ttChannel)
// // 域名默认国内: DEFAULT
// config.setUriConfig(UriConfig.DEFAULT);
// // 是否在控制台输出日志,可用于观察用户行为日志上报情况,建议仅在调试时使用,release版本请设置为false !
// AppLog.setEnableLog(BuildConfig.DEBUG)
// AppLog.init(application, config)
// }
// }
// } catch (e: Exception) {
// e.printStackTrace()
// }
// }
//
//}
\ No newline at end of file
...@@ -113,7 +113,7 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O ...@@ -113,7 +113,7 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O
hideLoading() hideLoading()
mPlayerManager.removeOnConnectedListerner(this) mPlayerManager.removeOnConnectedListerner(this)
mPlayerManager.playMode = XmPlayListControl.PlayMode.PLAY_MODEL_LIST_LOOP mPlayerManager.playMode = XmPlayListControl.PlayMode.PLAY_MODEL_SINGLE_LOOP
// Toast.makeText(this@XmlyPlayActivity, "播放器初始化成功", Toast.LENGTH_SHORT).show() // Toast.makeText(this@XmlyPlayActivity, "播放器初始化成功", Toast.LENGTH_SHORT).show()
loadUnlockMsg() loadUnlockMsg()
...@@ -451,7 +451,7 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O ...@@ -451,7 +451,7 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O
if (mPlayerManager.isPlaying && mStartListenTime != 0L) { if (mPlayerManager.isPlaying && mStartListenTime != 0L) {
mListenTime += System.currentTimeMillis() - mStartListenTime mListenTime += System.currentTimeMillis() - mStartListenTime
} }
if (mListenTime == 0L) { if (mListenTime != 0L) {
TrackManager.getInstance().addXmlyTime((mListenTime / 1000).toInt()) TrackManager.getInstance().addXmlyTime((mListenTime / 1000).toInt())
} }
super.finish() super.finish()
...@@ -474,6 +474,8 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O ...@@ -474,6 +474,8 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O
xmlyPlayAdapter.notifyItemChanged(position) xmlyPlayAdapter.notifyItemChanged(position)
} else { } else {
showToast("解锁失败,请重试") showToast("解锁失败,请重试")
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout()
} }
} }
......
...@@ -565,12 +565,25 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -565,12 +565,25 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo(DhGameActivity::class.java) readyGo(DhGameActivity::class.java)
} }
MainMyAdapter.TO_XMLY -> { MainMyAdapter.TO_XMLY -> {
if (taskBean.otherConfig != null) {
when (taskBean.otherConfig.status) {
0, 2 -> {
val activity: MainActivity? = activity as MainActivity? val activity: MainActivity? = activity as MainActivity?
activity?.let { activity?.let {
it.clickTab1Layout() it.clickTab1Layout()
it.selectXmly() it.selectXmly()
} }
} }
1 -> {
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_XMLY_CHALLENGE)
readyGo(AwardActivity::class.java, bundle)
}
}
}
}
} }
} }
} }
......
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