Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy Cleaner Junk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Easy Cleaner Junk
Commits
dfdf4fe4
Commit
dfdf4fe4
authored
Jul 24, 2024
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加聚合广告判断用admob还是max
parent
6fcc2e4d
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
542 additions
and
160 deletions
+542
-160
BackRelsutAt.kt
...va/com/test/easy/easycleanerjunk/activity/BackRelsutAt.kt
+11
-2
ResultActivity.kt
.../com/test/easy/easycleanerjunk/activity/ResultActivity.kt
+7
-2
AppManagerActivity.kt
...easycleanerjunk/activity/appmanager/AppManagerActivity.kt
+39
-12
AppManagerAnimationActivity.kt
...erjunk/activity/appmanager/AppManagerAnimationActivity.kt
+15
-4
BatteryInfoActivity.kt
...sycleanerjunk/activity/batteryinfo/BatteryInfoActivity.kt
+33
-11
BatteryInfoAnimationActivity.kt
...junk/activity/batteryinfo/BatteryInfoAnimationActivity.kt
+15
-4
LargeFileAnimationActivity.kt
...anerjunk/activity/largefile/LargeFileAnimationActivity.kt
+16
-5
LargeFileCleanActivity.kt
...ycleanerjunk/activity/largefile/LargeFileCleanActivity.kt
+41
-13
CompressionPhotoListActivity.kt
...ivity/photocompress/photo/CompressionPhotoListActivity.kt
+34
-12
PreviewCompressionPhotoActivity.kt
...ty/photocompress/photo/PreviewCompressionPhotoActivity.kt
+19
-6
StartCompressionPhotoActivity.kt
...vity/photocompress/photo/StartCompressionPhotoActivity.kt
+24
-8
CleanGuestActivity.kt
...y/easycleanerjunk/activity/scanjunk/CleanGuestActivity.kt
+10
-2
CleanJunkActivity.kt
...sy/easycleanerjunk/activity/scanjunk/CleanJunkActivity.kt
+35
-12
PrepareScanActivity.kt
.../easycleanerjunk/activity/scanjunk/PrepareScanActivity.kt
+13
-3
ScanJunkActivity.kt
...asy/easycleanerjunk/activity/scanjunk/ScanJunkActivity.kt
+13
-3
ScreenShotActivity.kt
...easycleanerjunk/activity/screenshot/ScreenShotActivity.kt
+50
-15
ScreenShotAnimationActivity.kt
...erjunk/activity/screenshot/ScreenShotAnimationActivity.kt
+13
-3
RepeatPhotoActivity.kt
...cleanerjunk/activity/similarphotos/RepeatPhotoActivity.kt
+48
-15
WhatsAppCleanerActivity.kt
...ycleanerjunk/activity/whatsapp/WhatsAppCleanerActivity.kt
+33
-11
WhatsAppCleanerAnimationActivity.kt
...unk/activity/whatsapp/WhatsAppCleanerAnimationActivity.kt
+13
-3
WhatsAppMessageCleanActivity.kt
...nerjunk/activity/whatsapp/WhatsAppMessageCleanActivity.kt
+34
-10
ToolsAdapter.kt
...ava/com/test/easy/easycleanerjunk/adapter/ToolsAdapter.kt
+10
-2
DialogViews.kt
...in/java/com/test/easy/easycleanerjunk/view/DialogViews.kt
+8
-1
PopExitWindow.kt
.../java/com/test/easy/easycleanerjunk/view/PopExitWindow.kt
+8
-1
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/activity/BackRelsutAt.kt
View file @
dfdf4fe4
...
...
@@ -15,6 +15,8 @@ import com.test.easy.easycleanerjunk.activity.similarphotos.RepeatPhotoAnimation
import
com.test.easy.easycleanerjunk.activity.whatsapp.WhatsAppCleanerAnimationActivity
import
com.test.easy.easycleanerjunk.databinding.AtLayoutBackRelustBinding
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.BarUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
...
...
@@ -81,9 +83,16 @@ class BackRelsutAt:BaseActivity<AtLayoutBackRelustBinding>() {
override
fun
initListener
()
{
binding
.
idClose
.
setOnClickListener
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
){
finishToMain
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
){
finishToMain
()
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/ResultActivity.kt
View file @
dfdf4fe4
...
...
@@ -17,7 +17,9 @@ import com.test.easy.easycleanerjunk.activity.whatsapp.WhatsAppCleanerAnimationA
import
com.test.easy.easycleanerjunk.adapter.AppFunctionAdapter
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutResultBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.KotlinExt.toFormatSize
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
...
...
@@ -151,8 +153,11 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
val
ss
=
SPUtils
.
getInstance
().
getInt
(
"isShowResultNaAd"
,
0
)
if
(
ss
==
1
)
{
binding
.
flAd
.
visibility
=
View
.
VISIBLE
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
this
@ResultActivity
,
binding
.
flAd
)
}
else
{
AdmobUtils
.
showNativeAd
(
this
@ResultActivity
,
binding
.
flAd
)
}
}
else
{
binding
.
flAd
.
visibility
=
View
.
GONE
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/appmanager/AppManagerActivity.kt
View file @
dfdf4fe4
...
...
@@ -14,7 +14,9 @@ import com.test.easy.easycleanerjunk.adapter.AppUninstallAdapter
import
com.test.easy.easycleanerjunk.bean.AppUninstallBean
import
com.test.easy.easycleanerjunk.databinding.ActivityAppManagerBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
...
...
@@ -51,6 +53,7 @@ class AppManagerActivity : BaseActivity<ActivityAppManagerBinding>() {
}
onBackPressedDispatcher
.
addCallback
{
showDialogFunctionExit
(
AFunOb
.
APP_MANAGER
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@AppManagerActivity
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
...
...
@@ -67,6 +70,25 @@ class AppManagerActivity : BaseActivity<ActivityAppManagerBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@AppManagerActivity
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@AppManagerActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
}
...
...
@@ -91,7 +113,12 @@ class AppManagerActivity : BaseActivity<ActivityAppManagerBinding>() {
binding
.
progressBar
.
visibility
=
View
.
GONE
adapter
.
setData
(
list
)
if
(
list
.
size
>
6
||
mustShowNativeAd
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
this
@AppManagerActivity
,
binding
.
flAd
)
}
else
{
AdmobUtils
.
showNativeAd
(
this
@AppManagerActivity
,
binding
.
flAd
)
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/appmanager/AppManagerAnimationActivity.kt
View file @
dfdf4fe4
...
...
@@ -8,6 +8,8 @@ import androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityAppManagerAnimationBinding
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
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
...
...
@@ -42,11 +44,20 @@ class AppManagerAnimationActivity : BaseActivity<ActivityAppManagerAnimationBind
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@AppManagerAnimationActivity
)
{
binding
.
lottie
.
cancelAnimation
()
startActivity
(
Intent
(
this
@AppManagerAnimationActivity
,
AppManagerActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@AppManagerAnimationActivity
)
{
binding
.
lottie
.
cancelAnimation
()
startActivity
(
Intent
(
this
@AppManagerAnimationActivity
,
AppManagerActivity
::
class
.
java
))
finish
()
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/batteryinfo/BatteryInfoActivity.kt
View file @
dfdf4fe4
...
...
@@ -11,6 +11,8 @@ import com.test.easy.easycleanerjunk.activity.BackRelsutAt
import
com.test.easy.easycleanerjunk.activity.ResultActivity
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutBatteryInfoBinding
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.service.BatteryReceiver
import
com.test.easy.easycleanerjunk.utils.SPUtils
...
...
@@ -68,6 +70,7 @@ class BatteryInfoActivity : BaseActivity<ActivityLayoutBatteryInfoBinding>() {
}
onBackPressedDispatcher
.
addCallback
{
showDialogFunctionExit
(
AFunOb
.
BATTERY_INFO
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@BatteryInfoActivity
,
isShowInterVal
=
false
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
...
...
@@ -84,6 +87,25 @@ class BatteryInfoActivity : BaseActivity<ActivityLayoutBatteryInfoBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@BatteryInfoActivity
,
isShowInterVal
=
false
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@BatteryInfoActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
binding
.
idTvGotIt
.
setOnClickListener
{
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/batteryinfo/BatteryInfoAnimationActivity.kt
View file @
dfdf4fe4
...
...
@@ -8,6 +8,8 @@ import androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityBatteryInfoAnimationBinding
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
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
...
...
@@ -44,11 +46,20 @@ class BatteryInfoAnimationActivity : BaseActivity<ActivityBatteryInfoAnimationBi
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@BatteryInfoAnimationActivity
)
{
binding
.
lottie
.
clearAnimation
()
startActivity
(
Intent
(
this
@BatteryInfoAnimationActivity
,
BatteryInfoActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@BatteryInfoAnimationActivity
)
{
binding
.
lottie
.
clearAnimation
()
startActivity
(
Intent
(
this
@BatteryInfoAnimationActivity
,
BatteryInfoActivity
::
class
.
java
))
finish
()
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/largefile/LargeFileAnimationActivity.kt
View file @
dfdf4fe4
...
...
@@ -8,13 +8,15 @@ import androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityLargeFileAnimationBinding
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
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
class
LargeFileAnimationActivity
:
BaseActivity
<
ActivityLargeFileAnimationBinding
>()
{
override
val
isLightMode
=
true
override
val
binding
:
ActivityLargeFileAnimationBinding
by
lazy
{
ActivityLargeFileAnimationBinding
.
inflate
(
layoutInflater
)
}
...
...
@@ -42,11 +44,20 @@ class LargeFileAnimationActivity : BaseActivity<ActivityLargeFileAnimationBindin
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@LargeFileAnimationActivity
)
{
showFinish
?.
invoke
()
startActivity
(
Intent
(
this
@LargeFileAnimationActivity
,
LargeFileCleanActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@LargeFileAnimationActivity
)
{
showFinish
?.
invoke
()
startActivity
(
Intent
(
this
@LargeFileAnimationActivity
,
LargeFileCleanActivity
::
class
.
java
))
finish
()
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/test/easy/easycleanerjunk/activity/largefile/LargeFileCleanActivity.kt
View file @
dfdf4fe4
...
...
@@ -40,12 +40,14 @@ import com.test.easy.easycleanerjunk.databinding.ActivityLayoutLargeFileBinding
import
com.test.easy.easycleanerjunk.databinding.ItemFileFilterBinding
import
com.test.easy.easycleanerjunk.databinding.PopupwindowFileFilterBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import
com.test.easy.easycleanerjunk.helps.LogEx
import
com.test.easy.easycleanerjunk.helps.MediaStoreUtils
import
com.test.easy.easycleanerjunk.helps.PermissionHelp.checkStorePermission
import
com.test.easy.easycleanerjunk.helps.PermissionHelp.requestStorePermission
import
com.test.easy.easycleanerjunk.helps.TimeUtils
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
import
com.test.easy.easycleanerjunk.view.AFunOb
...
...
@@ -192,6 +194,7 @@ class LargeFileCleanActivity : BaseActivity<ActivityLayoutLargeFileBinding>() {
}
onBackPressedDispatcher
.
addCallback
{
showDialogFunctionExit
(
AFunOb
.
LARGE_FILE_CLEANER
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@LargeFileCleanActivity
)
{
// finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
...
...
@@ -209,6 +212,26 @@ class LargeFileCleanActivity : BaseActivity<ActivityLayoutLargeFileBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@LargeFileCleanActivity
)
{
// finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@LargeFileCleanActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
}
...
...
@@ -235,7 +258,12 @@ class LargeFileCleanActivity : BaseActivity<ActivityLayoutLargeFileBinding>() {
binding
.
llTime
.
isEnabled
=
true
}
if
(
largeFileList
.
size
>
6
||
mustShowNativeAd
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
this
@LargeFileCleanActivity
,
binding
.
flAd
)
}
else
{
AdmobUtils
.
showNativeAd
(
this
@LargeFileCleanActivity
,
binding
.
flAd
)
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/photocompress/photo/CompressionPhotoListActivity.kt
View file @
dfdf4fe4
...
...
@@ -7,6 +7,8 @@ import androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.activity.BackRelsutAt
import
com.test.easy.easycleanerjunk.databinding.ActivityCompressionPhotoListBinding
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.BarUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
...
...
@@ -37,6 +39,7 @@ class CompressionPhotoListActivity : BaseActivity<ActivityCompressionPhotoListBi
onBackPressedDispatcher
.
addCallback
(
object
:
OnBackPressedCallback
(
true
)
{
override
fun
handleOnBackPressed
()
{
showDialogFunctionExit
(
AFunOb
.
PHOTO_COMPRESS
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@CompressionPhotoListActivity
,
isShowInterVal
=
false
)
{
PhotoCache
.
getInstance
().
clearCache
()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
...
...
@@ -54,6 +57,25 @@ class CompressionPhotoListActivity : BaseActivity<ActivityCompressionPhotoListBi
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@CompressionPhotoListActivity
,
isShowInterVal
=
false
)
{
PhotoCache
.
getInstance
().
clearCache
()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@CompressionPhotoListActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
})
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/photocompress/photo/PreviewCompressionPhotoActivity.kt
View file @
dfdf4fe4
...
...
@@ -7,6 +7,8 @@ import androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.R
import
com.test.easy.easycleanerjunk.databinding.ActivityPreviewCompressionPhotoBinding
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.BarUtils
...
...
@@ -39,6 +41,7 @@ class PreviewCompressionPhotoActivity : BaseActivity<ActivityPreviewCompressionP
dialog
.
setButtonClickListener
(
R
.
id
.
btnContinue
)
{
dialog
.
dismiss
()
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
)
{
CompressionPhotoListActivity
.
mActivity
?.
finish
()
val
intent
=
Intent
(
this
,
CompressioningActivity
::
class
.
java
)
...
...
@@ -46,6 +49,16 @@ class PreviewCompressionPhotoActivity : BaseActivity<ActivityPreviewCompressionP
startActivity
(
intent
)
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
)
{
CompressionPhotoListActivity
.
mActivity
?.
finish
()
val
intent
=
Intent
(
this
,
CompressioningActivity
::
class
.
java
)
intent
.
putExtra
(
"mode"
,
manager
.
getMode
())
startActivity
(
intent
)
finish
()
}
}
}
dialog
.
show
()
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/photocompress/photo/StartCompressionPhotoActivity.kt
View file @
dfdf4fe4
...
...
@@ -10,6 +10,8 @@ import androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityStartCompressionPhotoBinding
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.BarUtils
import
kotlinx.coroutines.Dispatchers
...
...
@@ -70,6 +72,7 @@ class StartCompressionPhotoActivity : BaseActivity<ActivityStartCompressionPhoto
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
aContext
)
{
val
mList
=
ImagesMediaUtils
.
getAlbums
(
aContext
)
if
(
mList
.
isNotEmpty
())
{
...
...
@@ -80,6 +83,19 @@ class StartCompressionPhotoActivity : BaseActivity<ActivityStartCompressionPhoto
finish
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
aContext
)
{
val
mList
=
ImagesMediaUtils
.
getAlbums
(
aContext
)
if
(
mList
.
isNotEmpty
())
{
startActivity
(
Intent
(
aContext
,
CompressionPhotoListActivity
::
class
.
java
))
finish
()
}
else
{
startActivity
(
Intent
(
aContext
,
CompressionPhotoListActivity
::
class
.
java
))
finish
()
}
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/scanjunk/CleanGuestActivity.kt
View file @
dfdf4fe4
...
...
@@ -7,6 +7,7 @@ import androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutCleanGuestBinding
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.BarUtils
...
...
@@ -28,9 +29,16 @@ class CleanGuestActivity : BaseActivity<ActivityLayoutCleanGuestBinding>() {
binding
.
idTvSkip
.
isVisible
=
true
// }, 3000)
binding
.
idTvSkip
.
setOnClickListener
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
){
finishToMain
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
){
finishToMain
()
}
}
}
binding
.
idTvClean
.
setOnClickListener
{
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/scanjunk/CleanJunkActivity.kt
View file @
dfdf4fe4
...
...
@@ -21,8 +21,10 @@ import com.test.easy.easycleanerjunk.databinding.ActivityLayoutCleanJunkBinding
import
com.test.easy.easycleanerjunk.databinding.ItemChildBinding
import
com.test.easy.easycleanerjunk.databinding.ItemParentBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.KotlinExt.toFormatSize
import
com.test.easy.easycleanerjunk.helps.MediaStoreUtils
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
...
...
@@ -87,6 +89,7 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
onBackPressedDispatcher
.
addCallback
(
object
:
OnBackPressedCallback
(
true
)
{
override
fun
handleOnBackPressed
()
{
showDialogFunctionExit
(
AFunOb
.
JUNK_CLEANER
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@CleanJunkActivity
)
{
//finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
...
...
@@ -104,6 +107,26 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@CleanJunkActivity
)
{
//finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@CleanJunkActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/scanjunk/PrepareScanActivity.kt
View file @
dfdf4fe4
...
...
@@ -6,6 +6,8 @@ import androidx.activity.OnBackPressedCallback
import
androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutParepreScanBinding
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.BarUtils
...
...
@@ -58,10 +60,18 @@ class PrepareScanActivity : BaseActivity<ActivityLayoutParepreScanBinding>() {
binding
.
idJunkScan
.
setAnimation
(
"easy_junk_scan/data.json"
)
binding
.
idJunkScan
.
playAnimation
()
binding
.
root
.
postDelayed
({
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
)
{
startActivity
(
Intent
(
this
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
)
{
startActivity
(
Intent
(
this
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
},
6000
)
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/scanjunk/ScanJunkActivity.kt
View file @
dfdf4fe4
...
...
@@ -9,6 +9,8 @@ import androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutScanJunkBinding
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
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
...
...
@@ -92,10 +94,18 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@ScanJunkActivity
)
{
startActivity
(
Intent
(
this
@ScanJunkActivity
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@ScanJunkActivity
)
{
startActivity
(
Intent
(
this
@ScanJunkActivity
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/screenshot/ScreenShotActivity.kt
View file @
dfdf4fe4
...
...
@@ -11,11 +11,13 @@ import com.test.easy.easycleanerjunk.bean.ScreenPhotoBean
import
com.test.easy.easycleanerjunk.bean.ScreenshotBean
import
com.test.easy.easycleanerjunk.databinding.ActivityScreenShotBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import
com.test.easy.easycleanerjunk.helps.FileHelps
import
com.test.easy.easycleanerjunk.helps.KotlinExt.toFormatSize
import
com.test.easy.easycleanerjunk.helps.PermissionHelp.checkStorePermission
import
com.test.easy.easycleanerjunk.helps.PermissionHelp.requestStorePermission
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
import
com.test.easy.easycleanerjunk.view.AFunOb
...
...
@@ -80,7 +82,12 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
binding
.
tvSize
.
text
=
sizeF
[
0
]
binding
.
tvUnit
.
text
=
sizeF
[
1
]
if
(
list
.
sumOf
{
it
.
screenPhotoBean
.
size
}
>
6
||
mustShowNativeAd
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
this
@ScreenShotActivity
,
binding
.
flAd
)
}
else
{
AdmobUtils
.
showNativeAd
(
this
@ScreenShotActivity
,
binding
.
flAd
)
}
}
}
}
...
...
@@ -91,6 +98,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
}
onBackPressedDispatcher
.
addCallback
{
showDialogFunctionExit
(
AFunOb
.
SCREENSHOT_CLEANER
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@ScreenShotActivity
)
{
//finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
...
...
@@ -108,6 +116,26 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@ScreenShotActivity
)
{
//finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@ScreenShotActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
...
...
@@ -125,9 +153,16 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
doDelete
()
}
else
{
showFileDeleteDialog
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
)
{
doDelete
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
)
{
doDelete
()
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/screenshot/ScreenShotAnimationActivity.kt
View file @
dfdf4fe4
...
...
@@ -8,6 +8,8 @@ import androidx.activity.OnBackPressedCallback
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityScreenShotAnimationBinding
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
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
...
...
@@ -50,10 +52,18 @@ class ScreenShotAnimationActivity : BaseActivity<ActivityScreenShotAnimationBind
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@ScreenShotAnimationActivity
)
{
startActivity
(
Intent
(
this
@ScreenShotAnimationActivity
,
ScreenShotActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@ScreenShotAnimationActivity
)
{
startActivity
(
Intent
(
this
@ScreenShotAnimationActivity
,
ScreenShotActivity
::
class
.
java
))
finish
()
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/similarphotos/RepeatPhotoActivity.kt
View file @
dfdf4fe4
...
...
@@ -19,9 +19,11 @@ import com.test.easy.easycleanerjunk.bean.ImageDataBean
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutRepeatPhotoBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.BaseApplication
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import
com.test.easy.easycleanerjunk.helps.FileHelps
import
com.test.easy.easycleanerjunk.helps.MediaStoreUtils
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.utils.NewFileUtils
...
...
@@ -54,8 +56,8 @@ class RepeatPhotoActivity : BaseActivity<ActivityLayoutRepeatPhotoBinding>() {
onBackPressedDispatcher
.
addCallback
(
object
:
OnBackPressedCallback
(
true
)
{
override
fun
handleOnBackPressed
()
{
showDialogFunctionExit
(
AFunOb
.
SIMILAR_PHOTOS
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@RepeatPhotoActivity
)
{
// finishToMain()
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
...
...
@@ -71,6 +73,25 @@ class RepeatPhotoActivity : BaseActivity<ActivityLayoutRepeatPhotoBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@RepeatPhotoActivity
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@RepeatPhotoActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
})
...
...
@@ -95,9 +116,16 @@ class RepeatPhotoActivity : BaseActivity<ActivityLayoutRepeatPhotoBinding>() {
if
(
s
==
0
)
{
doDeleteFile
()
}
else
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
)
{
doDeleteFile
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
)
{
doDeleteFile
()
}
}
}
}
...
...
@@ -136,7 +164,12 @@ class RepeatPhotoActivity : BaseActivity<ActivityLayoutRepeatPhotoBinding>() {
binding
.
idRlList
.
adapter
=
mAdapter
if
(
fileList
.
size
>
6
||
mustShowNativeAd
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
this
,
binding
.
flAd
)
}
else
{
AdmobUtils
.
showNativeAd
(
this
,
binding
.
flAd
)
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/whatsapp/WhatsAppCleanerActivity.kt
View file @
dfdf4fe4
...
...
@@ -13,11 +13,13 @@ import com.test.easy.easycleanerjunk.adapter.WhatsAppCleanerAdapter
import
com.test.easy.easycleanerjunk.bean.WhatsAppCleanerBean
import
com.test.easy.easycleanerjunk.databinding.ActivityWhatsAppCleanerBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.FileHelps.getDirFiles
import
com.test.easy.easycleanerjunk.helps.KotlinExt.toFormatSize
import
com.test.easy.easycleanerjunk.helps.LogEx
import
com.test.easy.easycleanerjunk.helps.PermissionHelp.checkStorePermission
import
com.test.easy.easycleanerjunk.helps.PermissionHelp.requestStorePermission
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.utils.FileHexEx.isImage
...
...
@@ -79,6 +81,7 @@ class WhatsAppCleanerActivity : BaseActivity<ActivityWhatsAppCleanerBinding>() {
}
onBackPressedDispatcher
.
addCallback
{
showDialogFunctionExit
(
AFunOb
.
WHATSAPP_CLEANER
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@WhatsAppCleanerActivity
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
...
...
@@ -95,6 +98,25 @@ class WhatsAppCleanerActivity : BaseActivity<ActivityWhatsAppCleanerBinding>() {
finishToMain
()
}
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@WhatsAppCleanerActivity
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
if
(
localCount
<
n
)
{
startActivity
(
Intent
(
this
@WhatsAppCleanerActivity
,
BackRelsutAt
::
class
.
java
))
finish
()
}
else
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
}
}
}
binding
.
tvTvGotIt
.
setOnClickListener
{
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/whatsapp/WhatsAppCleanerAnimationActivity.kt
View file @
dfdf4fe4
...
...
@@ -8,6 +8,8 @@ import androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.test.easy.easycleanerjunk.databinding.ActivityWhatsAppCleanerAnimationBinding
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
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
...
...
@@ -42,10 +44,18 @@ class WhatsAppCleanerAnimationActivity : BaseActivity<ActivityWhatsAppCleanerAni
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@WhatsAppCleanerAnimationActivity
)
{
startActivity
(
Intent
(
this
@WhatsAppCleanerAnimationActivity
,
WhatsAppCleanerActivity
::
class
.
java
))
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@WhatsAppCleanerAnimationActivity
)
{
startActivity
(
Intent
(
this
@WhatsAppCleanerAnimationActivity
,
WhatsAppCleanerActivity
::
class
.
java
))
finish
()
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/whatsapp/WhatsAppMessageCleanActivity.kt
View file @
dfdf4fe4
...
...
@@ -11,7 +11,9 @@ import com.test.easy.easycleanerjunk.adapter.WhatsAppMediaAdapter
import
com.test.easy.easycleanerjunk.bean.ImageDataBean
import
com.test.easy.easycleanerjunk.databinding.ActivityWhatsAppMessageCleanBinding
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.KotlinExt.toFormatSize
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.view.AFunOb.WHATSAPP_CLEANER
...
...
@@ -68,9 +70,16 @@ class WhatsAppMessageCleanActivity : BaseActivity<ActivityWhatsAppMessageCleanBi
onBackPressedDispatcher
.
onBackPressed
()
}
onBackPressedDispatcher
.
addCallback
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
@WhatsAppMessageCleanActivity
,
isShowInterVal
=
false
)
{
finishToMain
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
@WhatsAppMessageCleanActivity
,
isShowInterVal
=
false
)
{
finishToMain
()
}
}
}
binding
.
llSelectAll
.
setOnClickListener
{
it
.
isSelected
=
!
it
.
isSelected
...
...
@@ -84,6 +93,7 @@ class WhatsAppMessageCleanActivity : BaseActivity<ActivityWhatsAppMessageCleanBi
binding
.
tvClean
.
setOnClickListener
{
showFileDeleteDialog
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showInterstitialAd
(
this
)
{
val
list
=
adapter
.
getSelectData
()
runCatching
{
...
...
@@ -95,6 +105,20 @@ class WhatsAppMessageCleanActivity : BaseActivity<ActivityWhatsAppMessageCleanBi
finish
()
}
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
)
{
val
list
=
adapter
.
getSelectData
()
runCatching
{
list
.
forEach
{
File
(
it
).
delete
()
}
}
startActivity
(
Intent
(
this
,
ResultActivity
::
class
.
java
).
apply
{
putExtra
(
"from"
,
WHATSAPP_CLEANER
)
})
finish
()
}
}
}
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/adapter/ToolsAdapter.kt
View file @
dfdf4fe4
...
...
@@ -9,6 +9,8 @@ import com.test.easy.easycleanerjunk.R
import
com.test.easy.easycleanerjunk.databinding.ItemAdBinding
import
com.test.easy.easycleanerjunk.databinding.ItemToolGrid1Binding
import
com.test.easy.easycleanerjunk.databinding.ItemToolsGrid1Binding
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.view.AFunOb.APP_MANAGER
import
com.test.easy.easycleanerjunk.view.AFunOb.BATTERY_INFO
...
...
@@ -68,8 +70,14 @@ class ToolsAdapter(
if
(
data
.
isAd
)
{
val
binding
=
ItemAdBinding
.
bind
(
holder
.
itemView
)
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
loadNativeAd
()
MaxAdUtils
.
showNativeAd
(
context
,
binding
.
flAd
)
}
else
{
AdmobUtils
.
loadNativeAd
()
AdmobUtils
.
showNativeAd
(
context
,
binding
.
flAd
)
}
}
else
{
val
binding
=
ItemToolsGrid1Binding
.
bind
(
holder
.
itemView
)
...
...
app/src/main/java/com/test/easy/easycleanerjunk/view/DialogViews.kt
View file @
dfdf4fe4
...
...
@@ -15,6 +15,8 @@ import com.test.easy.easycleanerjunk.R
import
com.test.easy.easycleanerjunk.activity.photocompress.photo.CustomDialog
import
com.test.easy.easycleanerjunk.databinding.DialogLayoutFlowTypeBinding
import
com.test.easy.easycleanerjunk.databinding.DialogPermissonOpenBinding
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
com.test.easy.easycleanerjunk.view.AFunOb.APP_MANAGER
...
...
@@ -141,7 +143,12 @@ object DialogViews {
if
(
adS
==
1
)
{
view
.
visibility
=
View
.
VISIBLE
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
null
,
view
)
}
else
{
AdmobUtils
.
showNativeAd
(
null
,
view
)
}
}
else
{
view
.
visibility
=
View
.
GONE
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/view/PopExitWindow.kt
View file @
dfdf4fe4
...
...
@@ -10,6 +10,8 @@ import android.widget.PopupWindow
import
androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.activity.scanjunk.ScanJunkActivity
import
com.test.easy.easycleanerjunk.databinding.LayoutExitWlBinding
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.ActivityManagerUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
...
...
@@ -56,7 +58,12 @@ class PopExitWindow(private val activity: Activity) : PopupWindow() {
val
adS
=
SPUtils
.
getInstance
().
getInt
(
"naAdS"
,
1
)
if
(
adS
==
1
)
{
binding
.
idFlAd
.
visibility
=
View
.
VISIBLE
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
MaxAdUtils
.
showNativeAd
(
activity
,
binding
.
idFlAd
)
}
else
{
AdmobUtils
.
showNativeAd
(
activity
,
binding
.
idFlAd
)
}
}
else
{
binding
.
idFlAd
.
visibility
=
View
.
GONE
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment