Commit b612bad2 authored by jyx's avatar jyx

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

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