Commit b612bad2 authored by jyx's avatar jyx

新人红包排名观看激励视频逻辑

parent 97978a6e
......@@ -27,7 +27,6 @@ object ExpressManager {
}
}
/** 加载应用外信息流 */
fun loadNoAppOutExpress(framelayout: FrameLayout, isScreen: Boolean = false) {
if (AppConfig.groMoreVideoAdCount > 0) {
......@@ -37,11 +36,10 @@ object ExpressManager {
/** 获取应用内信息流 */
fun getExpressFrameLayout(): FrameLayout? {
if (AppConfig.groMoreVideoAdCount > 0) {
return GroMoreCarrierExpressManager.instance.getADFrameLayout()
return if (AppConfig.groMoreVideoAdCount > 0) {
GroMoreCarrierExpressManager.instance.getADFrameLayout()
} else {
return PreLoadExpressManager.getADFrameLayout()
// return TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout
PreLoadExpressManager.getADFrameLayout()
}
}
......@@ -50,13 +48,10 @@ object ExpressManager {
if (AppConfig.groMoreVideoAdCount > 0) {
return AppOutGroMoreCarrierExpressManager.instance.getADFrameLayout()
}
// else {
// return TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout
// }
return null
}
fun destroy(){
fun destroy() {
AppOutGroMoreCarrierExpressManager.instance.destroy()
}
}
\ No newline at end of file
......@@ -166,7 +166,11 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
vo["ecpm"] = ttNativeAd.preEcpm
vo["adSource"] = ttNativeAd.adNetworkPlatformId
vo["adType"] = Constant.GRO_MORE_ADTYPE1
if (isFromMain) {
vo["adid"] = CsjGroMoreManager.APP_IN_MAIN_AD_UNIT_EXPRESS_ID
} else {
vo["adid"] = CsjGroMoreManager.APP_IN_COMMON_AD_UNIT_EXPRESS_ID
}
TrackManager.getInstance().cmtGroMoreInfo(vo)
}
}
......
......@@ -138,6 +138,7 @@ object Constant {
const val CARRIER_MC_FIRSTDOWNLOAD = "MC_FIRSTDOWNLOAD" // 牧场人生下载奖励
const val CARRIER_FIRSTDOWNLOADS = "FIRSTDOWNLOADS" // 其他下载奖励
const val CARRIER_FLOW_BUBBLE = "FLOW_BUBBLE" // 气泡奖励
const val CARRIER_CHALLENGE_VEDIO_RANKING = "CHALLENGE_VEDIO_RANKING" // 新人红包排名奖励
const val AD_SOURCE_CSJ = "CSJ"
......
......@@ -20,7 +20,6 @@ import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.common.DeviceInfo.Companion.instance
import com.mints.flowbox.keepalive.appswitch.AntiAuditManager
import com.mints.flowbox.manager.AppPreferencesManager
import com.mints.flowbox.manager.AppTryPlayManager
import com.mints.flowbox.manager.TrackManager
import com.mints.flowbox.manager.UserManager
......@@ -188,6 +187,15 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent.text = "大量金币已到账"
tvAwardNext.visibility = View.GONE
}
Constant.CARRIER_CHALLENGE_VEDIO_RANKING -> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
vo["coin"] = curCoin
awardPresenter.reportAddCoinMsg(vo)
tvAwardContent.text = "${curCoin}金币已到账"
tvAwardNext.visibility = View.GONE
}
Constant.CARRIER_TURN_VEDIOCHALLENGE -> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
......@@ -329,7 +337,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
R.mipmap.icon_video
), null, null, null
)
}
Constant.CARRIER_FLOW_BUBBLE -> {
tvAwardContent.text = "大量金币已到账"
......@@ -340,7 +347,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
R.mipmap.icon_video
), null, null, null
)
}
Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD -> {
tvAwardContent.text = "大量金币已到账"
......@@ -605,8 +611,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
// gromore预加载
if(AppConfig.groMoreVideoAdCount>0){
PreCsjGroMoreVideoAdManager.getInstance().setVideoAdStatusListener(object:VideoAdStatusListener{
if (AppConfig.groMoreVideoAdCount > 0) {
PreCsjGroMoreVideoAdManager.getInstance()
.setVideoAdStatusListener(object : VideoAdStatusListener {
override fun adFail() {
}
......@@ -618,7 +625,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
override fun adDownload() {
}
})
PreCsjGroMoreVideoAdManager.getInstance().showAd(this,curCoin,carrierType,extraId)
PreCsjGroMoreVideoAdManager.getInstance().showAd(this, curCoin, carrierType, extraId)
return
}
......
......@@ -66,9 +66,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
baseApplication.initMiitHelper()
WifiStateManager.instance.registerWifiReceiver(this)
// 奖励页预加载 信息流广告
ExpressManager.loadExpress(true)
mainPresenter.attachView(this)
if (threeFragment == null) {
......
......@@ -110,7 +110,7 @@ class SpeedTestActivity : BaseActivity(), View.OnClickListener {
override fun onDestroy() {
super.onDestroy()
WifiAdManager.instance.onDestroy()
WifiAdManager.instance.setWifiAdStatusListener(null)
DownloadApkManager.instance.destroy()
}
......@@ -189,6 +189,8 @@ class SpeedTestActivity : BaseActivity(), View.OnClickListener {
btn_start.setTextColor(ContextCompat.getColor(mContext, R.color.color_main))
btn_start.setBackgroundResource(R.drawable.btn_stroke_main)
endTest()
isSpeedTestOver = true
startShowSpeedAnimator(0f, 0f)
}
......
......@@ -173,7 +173,7 @@ class WxLoginActivity : BaseActivity(), LoginView, View.OnClickListener, OnLogin
}
override fun updateDrawState(ds: TextPaint) {
ds.color = resources.getColor(R.color.color_FF9837)
ds.color = resources.getColor(R.color.color_main)
ds.isUnderlineText = false
}
})
......@@ -187,7 +187,7 @@ class WxLoginActivity : BaseActivity(), LoginView, View.OnClickListener, OnLogin
}
override fun updateDrawState(ds: TextPaint) {
ds.color = resources.getColor(R.color.color_FF9837)
ds.color = resources.getColor(R.color.color_main)
ds.isUnderlineText = false
}
})
......
......@@ -7,6 +7,7 @@ import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.mints.flowbox.R
import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.ad.wifi.WifiAdManager
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.keepalive.AlarmManager
import com.mints.flowbox.keepalive.OutAppRouter
......
......@@ -14,6 +14,7 @@ import com.mints.flowbox.ad.video.VideoAdingManager
import com.mints.flowbox.ad.video.base.VideoAdStatusListener
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.TrackManager
import com.mints.flowbox.manager.UserManager
import com.mints.flowbox.mvp.model.GetPacketBean
import com.mints.flowbox.mvp.model.VideoAdingBean
......@@ -26,7 +27,7 @@ import com.mints.flowbox.ui.widgets.dialog.ShareDialog
import com.mints.flowbox.utils.SpanUtils
import com.mints.flowbox.utils.ToolUtil
import kotlinx.android.synthetic.main.fragment_get_packet.*
import kotlinx.android.synthetic.main.fragment_get_packet.swipeRefreshLayout
import java.util.*
class GetPacketFragment : BaseFragment(), GetPacketView, View.OnClickListener,
SwipeRefreshLayout.OnRefreshListener {
......@@ -44,7 +45,6 @@ class GetPacketFragment : BaseFragment(), GetPacketView, View.OnClickListener,
if (AppConfig.FRAGMENT_THREE_SHOW_TYPE == 1) {
awardContainer.visibility = View.GONE
progressContainer.visibility = View.VISIBLE
tvVideo.bringToFront()
} else if (AppConfig.FRAGMENT_THREE_SHOW_TYPE == 2) {
awardContainer.visibility = View.VISIBLE
progressContainer.visibility = View.GONE
......@@ -272,13 +272,24 @@ class GetPacketFragment : BaseFragment(), GetPacketView, View.OnClickListener,
/** 激励视频播放成功回调 */
private fun videoAdingSuccess(coin: Int) {
if (coin == 0) return
if (!requireActivity().isFinishing) {
mGetPacketBean?.let {
if (it.rankingBottoms.challenge_vedio_ranking.coin == 0) {
val vo = HashMap<String, Any>()
vo["carrierType"] = it.rankingBottoms.challenge_vedio_ranking.carrierType
TrackManager.getInstance().reportAddCoinMsg(
activity,
vo
)
} else {
val bundle = Bundle()
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_VERSUS_VIDEO)
bundle.putString(
Constant.MAIN_CARRIER_TYPE,
it.rankingBottoms.challenge_vedio_ranking.carrierType
)
readyGo(AwardActivity::class.java, bundle)
}
}
}
override fun onRefresh() {
if (AppConfig.FRAGMENT_THREE_SHOW_TYPE == 1) {
......
......@@ -101,7 +101,7 @@
android:layout_centerVertical="true"
android:gravity="center"
android:text="发送验证码"
android:textColor="@color/color_FF9837"
android:textColor="@color/color_main"
android:textSize="12sp" />
</RelativeLayout>
......@@ -120,7 +120,7 @@
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
android:layout_marginRight="40dp"
android:background="@drawable/shape_btn_switch"
android:background="@drawable/shape_main"
android:gravity="center"
android:text="绑定手机号"
android:textColor="@color/white"
......
......@@ -47,7 +47,7 @@
android:layout_width="200dp"
android:layout_height="42dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/shape_btn_switch"
android:background="@drawable/shape_main"
android:gravity="center"
android:textColor="@color/white"
android:textSize="18sp" />
......
......@@ -21,7 +21,7 @@ public class LoginApi implements Callback {
private OnLoginListener loginListener;
private String platform;
private Context context;
private Handler handler;
private final Handler handler;
public LoginApi() {
handler = new Handler(Looper.getMainLooper(), this);
......
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