Commit 1ddd2d2a authored by leichao.gao's avatar leichao.gao

fix bug

parent 8737d7ce
......@@ -54,8 +54,6 @@ class MyApplication : BaseApplication() {
fun initApp() {
FacebookSdk.sdkInitialize(getApplicationContext());
FacebookSdk.setIsDebugEnabled(true);
FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS);
initNotificationWork()
InstallHelps.init {
if (ConfigHelper.admobTrueMaxFlase == 0) {
......
......@@ -12,6 +12,9 @@ import com.test.easy.easycleanerjunk.adapter.DeviceScanAdapter
import com.test.easy.easycleanerjunk.databinding.ActivityDeviceScanBinding
import com.test.easy.easycleanerjunk.helps.BaseActivity
import com.test.easy.easycleanerjunk.helps.ConfigHelper
import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import com.test.easy.easycleanerjunk.utils.SPUtils
import kotlin.math.abs
......@@ -67,6 +70,24 @@ class DeviceScanActivity : BaseActivity<ActivityDeviceScanBinding>() {
override fun initListener() {
super.initListener()
binding.tvStart.setOnClickListener {
val isShowDeviceAd = SPUtils.getInstance().getInt("isShowDeviceAd", 0)
if (isShowDeviceAd == 0) {
nextPage()
} else {
if (ConfigHelper.admobTrueMaxFlase == 0) {
MaxAdUtils.showInterstitialAd(this) {
nextPage()
}
} else {
AdmobUtils.showInterstitialAd(this) {
nextPage()
}
}
}
}
}
private fun nextPage() {
if (!ConfigHelper.ifGuestFirstClean) {
startActivity(Intent(this, CleanGuestActivity::class.java))
} else {
......@@ -74,7 +95,6 @@ class DeviceScanActivity : BaseActivity<ActivityDeviceScanBinding>() {
}
finish()
}
}
private fun RecyclerView.smoothScrollEquallyTo(pos: Int, speedFactor: Int = 50) {
val scroller = object : LinearSmoothScroller(context) {
......
......@@ -25,6 +25,10 @@ class AppManagerAnimationActivity : BaseActivity<ActivityAppManagerAnimationBind
private var job: Job? = null
override fun initView() {
if(ConfigHelper.isInterAdShow){
finish()
return
}
playLottie()
}
......
......@@ -25,6 +25,10 @@ class LargeFileAnimationActivity : BaseActivity<ActivityLargeFileAnimationBindin
private var job: Job? = null
override fun initView() {
if(ConfigHelper.isInterAdShow){
finish()
return
}
playLottie()
}
......
......@@ -30,6 +30,10 @@ class PrepareScanActivity : BaseActivity<ActivityLayoutParepreScanBinding>() {
}
private var job: Job? = null
override fun initView() {
if(ConfigHelper.isInterAdShow){
finish()
return
}
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
......
......@@ -23,6 +23,10 @@ class WhatsAppCleanerAnimationActivity : BaseActivity<ActivityWhatsAppCleanerAni
}
private var job: Job? = null
override fun initView() {
if(ConfigHelper.isInterAdShow){
finish()
return
}
resumeLottie()
}
......
......@@ -27,4 +27,6 @@ class ConfigBean() {
var adRequestCount: Int = 100
var adRequestFailCount: Int = 20
var facebookAdShowEventCount: Int = 3
var ifGuestFirstClean: Int = 1
var isShowDeviceAd: Int = 0
}
......@@ -70,6 +70,12 @@ object ComUtils {
SPUtils.getInstance().put("dayoutcomeHomePage", bean.dayoutcomeHomePage)
SPUtils.getInstance().put("maxShowNotificationCount", bean.maxShowNotificationCount)
SPUtils.getInstance().put("facebookAdShowEventCount", bean.facebookAdShowEventCount)
SPUtils.getInstance().put("isShowDeviceAd", bean.isShowDeviceAd)
if(bean.ifGuestFirstClean == 1){
SPUtils.getInstance().put("ifGuestFirstClean", false)
}else{
SPUtils.getInstance().put("ifGuestFirstClean", true)
}
ConfigHelper.admobTrueMaxFlase=bean.admobTrueMaxFlase
adDisplayInterval = bean.adInterval
maxMultiClick = bean.maxMultiClick
......
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