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

fix bug

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