Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
File Recovery RecycleBin
Commits
c1d33939
Commit
c1d33939
authored
Mar 13, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
a351ba45
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
145 additions
and
67 deletions
+145
-67
GlobalConfig.kt
...main/java/com/base/filerecoveryrecyclebin/GlobalConfig.kt
+57
-0
MyApplication.kt
...ain/java/com/base/filerecoveryrecyclebin/MyApplication.kt
+14
-4
SettingActivity.kt
...m/base/filerecoveryrecyclebin/activity/SettingActivity.kt
+7
-5
PrivacyManager.kt
.../filerecoveryrecyclebin/activity/splash/PrivacyManager.kt
+2
-1
AdmobBannerColla.kt
...base/filerecoveryrecyclebin/ads/admob/AdmobBannerColla.kt
+2
-1
AdmobInterstitialUtils.kt
...ilerecoveryrecyclebin/ads/admob/AdmobInterstitialUtils.kt
+2
-2
AdmobNativeUtils.kt
...base/filerecoveryrecyclebin/ads/admob/AdmobNativeUtils.kt
+2
-2
AdmobOpenUtils.kt
...m/base/filerecoveryrecyclebin/ads/admob/AdmobOpenUtils.kt
+3
-2
SolarEngineEvent.kt
...base/filerecoveryrecyclebin/ads/admob/SolarEngineEvent.kt
+4
-3
BlackUtils.kt
...n/java/com/base/filerecoveryrecyclebin/help/BlackUtils.kt
+4
-3
ConfigHelper.kt
...java/com/base/filerecoveryrecyclebin/help/ConfigHelper.kt
+17
-26
NewComUtils.kt
.../java/com/base/filerecoveryrecyclebin/help/NewComUtils.kt
+16
-8
WeatherUtils.kt
...java/com/base/filerecoveryrecyclebin/help/WeatherUtils.kt
+8
-5
EventUtils.kt
.../java/com/base/filerecoveryrecyclebin/utils/EventUtils.kt
+7
-5
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/GlobalConfig.kt
0 → 100644
View file @
c1d33939
package
com.base.filerecoveryrecyclebin
/**
*Create by SleepDog on 2024-12-24
*/
object
GlobalConfig
{
//包名
const
val
PACKAGE_NAME
=
"com.scan.barcode.deeplink"
// 域名
/**
* Url Event 上报接口
*/
const
val
URL_EVENT
=
"https://rp.gamexzonerk.xyz"
/**
* Url Api 业务接口
*/
const
val
URL_API
=
"https://api.gamexzonerk.xyz"
/**
* Url Privacy 隐私链接
*/
const
val
URL_PRIVACY
=
"https://sites.google.com/view/qrbarcodedd/qr"
/**
* Url Use 使用条款
*/
const
val
URL_USE
=
"https://sites.google.com/view/termsofscanqr/terms-of-scan-qr"
/**
* Key Aes 加密key
*/
const
val
KEY_AES
=
"o3yb8vzeptlki1ve"
/**
* Key solar 归因key
*/
const
val
KEY_SOLAR
=
""
// admob广告位id
inline
val
ID_ADMOB_APPLICATION
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ca-app-pub-3940256099942544~3347511713"
else
"ca-app-pub-3940256099942544~3347511713"
inline
val
ID_ADMOB_INTER
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ca-app-pub-3940256099942544/1033173712"
else
"ca-app-pub-3940256099942544/1033173712"
inline
val
ID_ADMOB_NATIVE
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ca-app-pub-3940256099942544/2247696110"
else
"ca-app-pub-3940256099942544/2247696110"
inline
val
ID_ADMOB_OPEN
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ca-app-pub-3940256099942544/9257395921"
else
"ca-app-pub-3940256099942544/9257395921"
inline
val
ID_ADMOB_BANNER
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ca-app-pub-3940256099942544/9214589741"
else
"ca-app-pub-3940256099942544/9214589741"
inline
val
ID_ADMOB_REWARD
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ca-app-pub-3940256099942544/5224354917"
else
"ca-app-pub-3940256099942544/5224354917"
// max广告位id
inline
val
KEY_MAX
get
()
=
if
(
BuildConfig
.
DEBUG
)
"GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
else
"GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
inline
val
ID_MAX_INTER
get
()
=
if
(
BuildConfig
.
DEBUG
)
"3a9efc39d536ffe6"
else
"3a9efc39d536ffe6"
inline
val
ID_MAX_NATIVE
get
()
=
if
(
BuildConfig
.
DEBUG
)
"cc0cc5b36a2608ca"
else
"cc0cc5b36a2608ca"
inline
val
ID_MAX_OPEN
get
()
=
if
(
BuildConfig
.
DEBUG
)
"ad4efa4a0bc2a585"
else
"ad4efa4a0bc2a585"
inline
val
ID_MAX_BANNER
get
()
=
if
(
BuildConfig
.
DEBUG
)
""
else
""
inline
val
ID_MAX_REWARD
get
()
=
if
(
BuildConfig
.
DEBUG
)
""
else
""
}
\ No newline at end of file
app/src/main/java/com/base/filerecoveryrecyclebin/MyApplication.kt
View file @
c1d33939
...
@@ -13,7 +13,6 @@ import com.base.filerecoveryrecyclebin.fcm.FCMManager
...
@@ -13,7 +13,6 @@ import com.base.filerecoveryrecyclebin.fcm.FCMManager
import
com.base.filerecoveryrecyclebin.fcm.ScreenStatusReceiver
import
com.base.filerecoveryrecyclebin.fcm.ScreenStatusReceiver
import
com.base.filerecoveryrecyclebin.help.BaseApplication
import
com.base.filerecoveryrecyclebin.help.BaseApplication
import
com.base.filerecoveryrecyclebin.help.BlackUtils
import
com.base.filerecoveryrecyclebin.help.BlackUtils
import
com.base.filerecoveryrecyclebin.help.ConfigHelper
import
com.base.filerecoveryrecyclebin.help.InstallHelps
import
com.base.filerecoveryrecyclebin.help.InstallHelps
import
com.base.filerecoveryrecyclebin.help.WeatherUtils
import
com.base.filerecoveryrecyclebin.help.WeatherUtils
import
com.base.filerecoveryrecyclebin.service.StayJobService.Companion.startJob
import
com.base.filerecoveryrecyclebin.service.StayJobService.Companion.startJob
...
@@ -72,7 +71,7 @@ class MyApplication : BaseApplication() {
...
@@ -72,7 +71,7 @@ class MyApplication : BaseApplication() {
FacebookSdk
.
sdkInitialize
(
applicationContext
)
FacebookSdk
.
sdkInitialize
(
applicationContext
)
// FacebookSdk.setIsDebugEnabled(true)
// FacebookSdk.setIsDebugEnabled(true)
// FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS)
// FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS)
val
topic
=
ConfigHelper
.
packageName
+
"_push"
val
topic
=
GlobalConfig
.
PACKAGE_NAME
+
"_push"
LogEx
.
logDebug
(
TAG
,
"topic=${topic}"
)
LogEx
.
logDebug
(
TAG
,
"topic=${topic}"
)
FCMManager
.
initFirebase
(
this
)
FCMManager
.
initFirebase
(
this
)
FCMManager
.
subscribeToTopic
(
topic
)
FCMManager
.
subscribeToTopic
(
topic
)
...
@@ -134,7 +133,7 @@ class MyApplication : BaseApplication() {
...
@@ -134,7 +133,7 @@ class MyApplication : BaseApplication() {
var
flag
=
if
(
topActivity
==
null
)
{
var
flag
=
if
(
topActivity
==
null
)
{
true
true
}
else
{
}
else
{
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
}
}
if
(
activity
.
localClassName
.
contains
(
"AppLovinFullscreenActivity"
))
{
if
(
activity
.
localClassName
.
contains
(
"AppLovinFullscreenActivity"
))
{
flag
=
false
flag
=
false
...
@@ -198,7 +197,7 @@ class MyApplication : BaseApplication() {
...
@@ -198,7 +197,7 @@ class MyApplication : BaseApplication() {
})
})
}
}
private
fun
solarInit
(){
private
fun
solarInit
()
{
SolarEngineManager
.
getInstance
().
preInit
(
context
,
"413882174e882211"
)
SolarEngineManager
.
getInstance
().
preInit
(
context
,
"413882174e882211"
)
val
config
=
SolarEngineConfig
.
Builder
()
val
config
=
SolarEngineConfig
.
Builder
()
// .logEnabled() //开启本地调试日志
// .logEnabled() //开启本地调试日志
...
@@ -225,4 +224,15 @@ class MyApplication : BaseApplication() {
...
@@ -225,4 +224,15 @@ class MyApplication : BaseApplication() {
}
}
}
}
}
}
val
noLoadingActivities
=
listOf
(
"full"
,
// 过滤全屏广告
"adActivity"
,
"AdActivity"
,
"AppLovinFullscreenActivity"
,
Splash2Activity
::
class
.
java
.
simpleName
// 返回前台时不跳转启动页的 activity
)
}
}
\ No newline at end of file
app/src/main/java/com/base/filerecoveryrecyclebin/activity/SettingActivity.kt
View file @
c1d33939
...
@@ -7,6 +7,7 @@ import android.content.Intent
...
@@ -7,6 +7,7 @@ import android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
import
android.net.Uri
import
android.net.Uri
import
androidx.activity.addCallback
import
androidx.activity.addCallback
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.bean.ConstObject.fcmNotification
import
com.base.filerecoveryrecyclebin.bean.ConstObject.fcmNotification
import
com.base.filerecoveryrecyclebin.bean.ConstObject.stayNotification
import
com.base.filerecoveryrecyclebin.bean.ConstObject.stayNotification
import
com.base.filerecoveryrecyclebin.databinding.ActivitySettingBinding
import
com.base.filerecoveryrecyclebin.databinding.ActivitySettingBinding
...
@@ -55,7 +56,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
...
@@ -55,7 +56,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
}
}
binding
.
switchFcmNotification
.
setOnCheckedChangeListener
{
buttonView
,
isChecked
->
binding
.
switchFcmNotification
.
setOnCheckedChangeListener
{
buttonView
,
isChecked
->
fcmNotification
=
isChecked
fcmNotification
=
isChecked
val
topic
=
"${
ConfigHelper.packageName
}_push"
val
topic
=
"${
GlobalConfig.PACKAGE_NAME
}_push"
if
(
isChecked
)
{
if
(
isChecked
)
{
subscribeToTopic
(
topic
)
subscribeToTopic
(
topic
)
}
else
{
}
else
{
...
@@ -66,7 +67,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
...
@@ -66,7 +67,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
binding
.
llPrivacy
.
setOnClickListener
{
binding
.
llPrivacy
.
setOnClickListener
{
val
intent
=
Intent
(
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
ConfigHelper
.
privacyPolicy
)
Uri
.
parse
(
GlobalConfig
.
URL_PRIVACY
)
)
)
startActivity
(
intent
)
startActivity
(
intent
)
// NotificationUtil.sendNotification(this, ConstObject.ID_WHEATHER)
// NotificationUtil.sendNotification(this, ConstObject.ID_WHEATHER)
...
@@ -78,6 +79,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
...
@@ -78,6 +79,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
}
}
}
}
fun
copyText
(
context
:
Context
,
text
:
String
?)
{
fun
copyText
(
context
:
Context
,
text
:
String
?)
{
val
clipboardManager
:
ClipboardManager
=
val
clipboardManager
:
ClipboardManager
=
context
.
getSystemService
(
CLIPBOARD_SERVICE
)
as
ClipboardManager
context
.
getSystemService
(
CLIPBOARD_SERVICE
)
as
ClipboardManager
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/activity/splash/PrivacyManager.kt
View file @
c1d33939
...
@@ -6,6 +6,7 @@ import android.net.Uri
...
@@ -6,6 +6,7 @@ import android.net.Uri
import
android.text.SpannableString
import
android.text.SpannableString
import
android.text.Spanned
import
android.text.Spanned
import
android.text.style.UnderlineSpan
import
android.text.style.UnderlineSpan
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.MyApplication
import
com.base.filerecoveryrecyclebin.MyApplication
import
com.base.filerecoveryrecyclebin.bean.ConstObject.ifAgreePrivacy
import
com.base.filerecoveryrecyclebin.bean.ConstObject.ifAgreePrivacy
import
com.base.filerecoveryrecyclebin.databinding.ActivitySplashBinding
import
com.base.filerecoveryrecyclebin.databinding.ActivitySplashBinding
...
@@ -48,7 +49,7 @@ class PrivacyManager {
...
@@ -48,7 +49,7 @@ class PrivacyManager {
binding
.
idTvPrivacyPolicy
.
setOnClickListener
{
binding
.
idTvPrivacyPolicy
.
setOnClickListener
{
val
intent
=
Intent
(
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
ConfigHelper
.
privacyPolicy
)
Uri
.
parse
(
GlobalConfig
.
URL_PRIVACY
)
)
)
context
.
startActivity
(
intent
)
context
.
startActivity
(
intent
)
}
}
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/ads/admob/AdmobBannerColla.kt
View file @
c1d33939
...
@@ -8,6 +8,7 @@ import android.view.ViewGroup
...
@@ -8,6 +8,7 @@ import android.view.ViewGroup
import
android.view.ViewTreeObserver
import
android.view.ViewTreeObserver
import
androidx.core.view.children
import
androidx.core.view.children
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.help.ConfigHelper
import
com.base.filerecoveryrecyclebin.help.ConfigHelper
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
import
com.base.filerecoveryrecyclebin.utils.LogEx
import
com.base.filerecoveryrecyclebin.utils.LogEx
...
@@ -46,7 +47,7 @@ object AdmobBannerUtils {
...
@@ -46,7 +47,7 @@ object AdmobBannerUtils {
val
screenPixelDensity
=
context
.
resources
.
displayMetrics
.
density
val
screenPixelDensity
=
context
.
resources
.
displayMetrics
.
density
val
adWidth
=
(
parent
.
width
/
screenPixelDensity
).
toInt
()
val
adWidth
=
(
parent
.
width
/
screenPixelDensity
).
toInt
()
val
adSize
=
AdSize
.
getCurrentOrientationAnchoredAdaptiveBannerAdSize
(
context
,
adWidth
)
val
adSize
=
AdSize
.
getCurrentOrientationAnchoredAdaptiveBannerAdSize
(
context
,
adWidth
)
adView
?.
adUnitId
=
if
(
BuildConfig
.
DEBUG
)
ConfigHelper
.
bannerAdmobIdTest
else
ConfigHelper
.
bannerAdmobId
adView
?.
adUnitId
=
GlobalConfig
.
ID_ADMOB_BANNER
adView
?.
setAdSize
(
adSize
)
adView
?.
setAdSize
(
adSize
)
loadCollapsibleBanner
(
parent
)
loadCollapsibleBanner
(
parent
)
parent
.
viewTreeObserver
.
removeOnGlobalLayoutListener
(
listener
)
parent
.
viewTreeObserver
.
removeOnGlobalLayoutListener
(
listener
)
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/ads/admob/AdmobInterstitialUtils.kt
View file @
c1d33939
...
@@ -4,6 +4,7 @@ import android.app.Activity
...
@@ -4,6 +4,7 @@ import android.app.Activity
import
android.app.Dialog
import
android.app.Dialog
import
android.widget.Toast
import
android.widget.Toast
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.lastShowedOnHiddenTime
import
com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.lastShowedOnHiddenTime
...
@@ -87,8 +88,7 @@ object AdmobInterstitialUtils {
...
@@ -87,8 +88,7 @@ object AdmobInterstitialUtils {
obj
.
put
(
"from"
,
activity
.
javaClass
.
simpleName
)
obj
.
put
(
"from"
,
activity
.
javaClass
.
simpleName
)
EventUtils
.
event
(
"ad_pull_start"
,
ext
=
obj
)
EventUtils
.
event
(
"ad_pull_start"
,
ext
=
obj
)
InterstitialAd
.
load
(
InterstitialAd
.
load
(
activity
,
activity
,
GlobalConfig
.
ID_ADMOB_INTER
,
if
(
BuildConfig
.
DEBUG
)
ConfigHelper
.
interAdmobIdTest
else
ConfigHelper
.
interAdmobId
,
mRequest
,
mRequest
,
object
:
InterstitialAdLoadCallback
()
{
object
:
InterstitialAdLoadCallback
()
{
override
fun
onAdFailedToLoad
(
p0
:
LoadAdError
)
{
override
fun
onAdFailedToLoad
(
p0
:
LoadAdError
)
{
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/ads/admob/AdmobNativeUtils.kt
View file @
c1d33939
...
@@ -4,6 +4,7 @@ import android.app.Activity
...
@@ -4,6 +4,7 @@ import android.app.Activity
import
android.view.ViewGroup
import
android.view.ViewGroup
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.admob.AdmobEvent.clickAd
import
com.base.filerecoveryrecyclebin.ads.admob.AdmobEvent.clickAd
...
@@ -49,8 +50,7 @@ object AdmobNativeUtils {
...
@@ -49,8 +50,7 @@ object AdmobNativeUtils {
obj
.
put
(
"ad_type"
,
"nativeAd"
)
obj
.
put
(
"ad_type"
,
"nativeAd"
)
val
adLoader
=
AdLoader
.
Builder
(
val
adLoader
=
AdLoader
.
Builder
(
BaseApplication
.
context
,
BaseApplication
.
context
,
GlobalConfig
.
ID_ADMOB_NATIVE
if
(
BuildConfig
.
DEBUG
)
ConfigHelper
.
nativeAdmobIdTest
else
ConfigHelper
.
nativeAdmobId
).
forNativeAd
{
).
forNativeAd
{
nativeLoadTime
=
System
.
currentTimeMillis
()
nativeLoadTime
=
System
.
currentTimeMillis
()
nativeAd
=
it
nativeAd
=
it
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/ads/admob/AdmobOpenUtils.kt
View file @
c1d33939
...
@@ -2,6 +2,7 @@ package com.base.filerecoveryrecyclebin.ads.admob
...
@@ -2,6 +2,7 @@ package com.base.filerecoveryrecyclebin.ads.admob
import
android.app.Activity
import
android.app.Activity
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.admob.AdmobEvent.clickAd
import
com.base.filerecoveryrecyclebin.ads.admob.AdmobEvent.clickAd
import
com.base.filerecoveryrecyclebin.ads.admob.AdmobEvent.pullAd
import
com.base.filerecoveryrecyclebin.ads.admob.AdmobEvent.pullAd
...
@@ -43,7 +44,7 @@ object AdmobOpenUtils {
...
@@ -43,7 +44,7 @@ object AdmobOpenUtils {
EventUtils
.
event
(
"ad_pull_start"
,
ext
=
obj
)
EventUtils
.
event
(
"ad_pull_start"
,
ext
=
obj
)
AppOpenAd
.
load
(
AppOpenAd
.
load
(
BaseApplication
.
context
,
BaseApplication
.
context
,
if
(
BuildConfig
.
DEBUG
)
ConfigHelper
.
openAdmobIdTest
else
ConfigHelper
.
openAdmobId
,
GlobalConfig
.
ID_ADMOB_OPEN
,
mRequest
,
mRequest
,
object
:
AppOpenAd
.
AppOpenAdLoadCallback
()
{
object
:
AppOpenAd
.
AppOpenAdLoadCallback
()
{
override
fun
onAdLoaded
(
ad
:
AppOpenAd
)
{
override
fun
onAdLoaded
(
ad
:
AppOpenAd
)
{
...
@@ -89,7 +90,7 @@ object AdmobOpenUtils {
...
@@ -89,7 +90,7 @@ object AdmobOpenUtils {
EventUtils
.
event
(
"ad_expire"
,
ext
=
obj2
)
EventUtils
.
event
(
"ad_expire"
,
ext
=
obj2
)
return
return
}
}
if
(!
isRetry
){
if
(!
isRetry
)
{
val
obj1
=
JSONObject
()
val
obj1
=
JSONObject
()
obj1
.
put
(
"ad_unit"
,
"openAd"
)
obj1
.
put
(
"ad_unit"
,
"openAd"
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj1
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj1
)
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/ads/admob/SolarEngineEvent.kt
View file @
c1d33939
package
com.base.filerecoveryrecyclebin.ads.admob
package
com.base.filerecoveryrecyclebin.ads.admob
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.help.ConfigHelper
import
com.base.filerecoveryrecyclebin.help.ConfigHelper
import
com.google.android.gms.ads.appopen.AppOpenAd
import
com.google.android.gms.ads.appopen.AppOpenAd
import
com.google.android.gms.ads.interstitial.InterstitialAd
import
com.google.android.gms.ads.interstitial.InterstitialAd
...
@@ -36,7 +37,7 @@ object SolarEngineEvent {
...
@@ -36,7 +37,7 @@ object SolarEngineEvent {
// 0:其它
// 0:其它
var
adType
=
-
1
var
adType
=
-
1
//变现平台的应用 ID
//变现平台的应用 ID
var
adNetworkAppID
=
ConfigHelper
.
ID_ADMOB_APPLICATION
var
adNetworkAppID
=
GlobalConfig
.
ID_ADMOB_APPLICATION
//变现平台的变现广告位 ID
//变现平台的变现广告位 ID
var
adNetworkADID
=
""
var
adNetworkADID
=
""
//广告 ecpm,单位:元(广告千次展现的变现收入,0或负值表示没传,单位为元)
//广告 ecpm,单位:元(广告千次展现的变现收入,0或负值表示没传,单位为元)
...
@@ -57,7 +58,7 @@ object SolarEngineEvent {
...
@@ -57,7 +58,7 @@ object SolarEngineEvent {
is
NativeAd
->
{
is
NativeAd
->
{
adType
=
6
adType
=
6
adNetworkADID
=
ConfigHelper
.
nativeAdmobId
adNetworkADID
=
GlobalConfig
.
ID_ADMOB_NATIVE
}
}
is
RewardedAd
->
{
is
RewardedAd
->
{
...
@@ -67,7 +68,7 @@ object SolarEngineEvent {
...
@@ -67,7 +68,7 @@ object SolarEngineEvent {
else
->
{
//banner
else
->
{
//banner
adType
=
5
adType
=
5
adNetworkADID
=
ConfigHelper
.
bannerAdmobId
adNetworkADID
=
GlobalConfig
.
ID_ADMOB_BANNER
}
}
}
}
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/help/BlackUtils.kt
View file @
c1d33939
...
@@ -2,6 +2,7 @@ package com.base.filerecoveryrecyclebin.help
...
@@ -2,6 +2,7 @@ package com.base.filerecoveryrecyclebin.help
import
android.os.Build
import
android.os.Build
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import
com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import
com.base.filerecoveryrecyclebin.utils.AESHelper
import
com.base.filerecoveryrecyclebin.utils.AESHelper
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
...
@@ -22,9 +23,9 @@ object BlackUtils {
...
@@ -22,9 +23,9 @@ object BlackUtils {
private
val
TAG
=
"BlackUtils"
private
val
TAG
=
"BlackUtils"
private
val
blcurl
by
lazy
{
private
val
blcurl
by
lazy
{
val
pkg
=
ConfigHelper
.
packageName
val
pkg
=
GlobalConfig
.
PACKAGE_NAME
val
url
=
StringBuilder
(
val
url
=
StringBuilder
(
"${
ConfigHelper.apiUrl
}/${
"${
GlobalConfig.URL_API
}/${
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
}
cl
"
}
cl
"
)
)
...
@@ -33,7 +34,7 @@ object BlackUtils {
...
@@ -33,7 +34,7 @@ object BlackUtils {
}
}
fun
requestBlack
()
{
fun
requestBlack
()
{
val
pkg
=
ConfigHelper
.
packageName
val
pkg
=
GlobalConfig
.
PACKAGE_NAME
val
s
=
JSONObject
()
val
s
=
JSONObject
()
val
s2
=
JSONObject
()
val
s2
=
JSONObject
()
.
put
(
"${pkg}_3"
,
AppPreferences
.
getInstance
().
getString
(
"Equipment"
,
""
))
.
put
(
"${pkg}_3"
,
AppPreferences
.
getInstance
().
getString
(
"Equipment"
,
""
))
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/help/ConfigHelper.kt
View file @
c1d33939
...
@@ -5,45 +5,36 @@ import com.base.filerecoveryrecyclebin.activity.splash.Splash2Activity
...
@@ -5,45 +5,36 @@ import com.base.filerecoveryrecyclebin.activity.splash.Splash2Activity
object
ConfigHelper
{
object
ConfigHelper
{
const
val
privacyPolicy
=
"https://sites.google.com/view/dumpsterphoto-recovery/home"
//
const val privacyPolicy = "https://sites.google.com/view/dumpsterphoto-recovery/home"
// 域名
// 域名
const
val
eventUrl
=
"https://rp.rocioxyn.xyz"
//
const val eventUrl = "https://rp.rocioxyn.xyz"
const
val
apiUrl
=
"https://api.rocioxyn.xyz"
//
const val apiUrl = "https://api.rocioxyn.xyz"
//admob test id
//admob test id
const
val
openAdmobIdTest
=
"/6499/example/app-open"
//
const val openAdmobIdTest = "/6499/example/app-open"
const
val
bannerAdmobIdTest
=
"ca-app-pub-3940256099942544/9214589741"
//
const val bannerAdmobIdTest = "ca-app-pub-3940256099942544/9214589741"
const
val
interAdmobIdTest
=
"ca-app-pub-3940256099942544/1033173712"
//
const val interAdmobIdTest = "ca-app-pub-3940256099942544/1033173712"
const
val
nativeAdmobIdTest
=
"ca-app-pub-3940256099942544/2247696110"
//
const val nativeAdmobIdTest = "ca-app-pub-3940256099942544/2247696110"
inline
val
ID_ADMOB_APPLICATION
get
()
=
"ca-app-pub-3940256099942544~3347511713"
//
inline val ID_ADMOB_APPLICATION get() = "ca-app-pub-3940256099942544~3347511713"
// admob广告id
// admob广告id
const
val
interAdmobId
=
"ca-app-pub-3940256099942544/1033173712"
//
const val interAdmobId = "ca-app-pub-3940256099942544/1033173712"
const
val
nativeAdmobId
=
"ca-app-pub-3940256099942544/2247696110"
//
const val nativeAdmobId = "ca-app-pub-3940256099942544/2247696110"
const
val
openAdmobId
=
"ca-app-pub-3940256099942544/9257395921"
//
const val openAdmobId = "ca-app-pub-3940256099942544/9257395921"
const
val
bannerAdmobId
=
"ca-app-pub-3940256099942544/9214589741"
//
const val bannerAdmobId = "ca-app-pub-3940256099942544/9214589741"
//max id
//max id
const
val
interAdMaxId
=
"b31e7f6d11ee659e"
//
const val interAdMaxId = "b31e7f6d11ee659e"
const
val
nativeAdMaxId
=
"96e8fe78b0efc5d1"
//
const val nativeAdMaxId = "96e8fe78b0efc5d1"
const
val
openAdMaxId
=
"d1d943cdd3127c90"
//
const val openAdMaxId = "d1d943cdd3127c90"
const
val
bannerMaxId
=
"ca-app-pub-3940256099942544/9214589741"
//
const val bannerMaxId = "ca-app-pub-3940256099942544/9214589741"
//一定展示大图广告
//一定展示大图广告
var
mustShowNativeAd
:
Boolean
=
false
var
mustShowNativeAd
:
Boolean
=
false
// 正式包名
// 正式包名
const
val
packageName
=
"com.baloota.photorecyclebin.awm.sp"
// const val packageName = "com.baloota.photorecyclebin.awm.sp"
val
noLoadingActivities
=
listOf
(
"full"
,
// 过滤全屏广告
"adActivity"
,
"AdActivity"
,
"AppLovinFullscreenActivity"
,
Splash2Activity
::
class
.
java
.
simpleName
// 返回前台时不跳转启动页的 activity
)
}
}
\ No newline at end of file
app/src/main/java/com/base/filerecoveryrecyclebin/help/NewComUtils.kt
View file @
c1d33939
...
@@ -2,6 +2,7 @@ package com.base.filerecoveryrecyclebin.help
...
@@ -2,6 +2,7 @@ package com.base.filerecoveryrecyclebin.help
import
android.util.Log
import
android.util.Log
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.bean.ConfigBean
import
com.base.filerecoveryrecyclebin.bean.ConfigBean
import
com.base.filerecoveryrecyclebin.utils.AESHelper
import
com.base.filerecoveryrecyclebin.utils.AESHelper
...
@@ -23,15 +24,17 @@ import java.net.URL
...
@@ -23,15 +24,17 @@ import java.net.URL
import
java.util.Locale
import
java.util.Locale
object
NewComUtils
{
object
NewComUtils
{
private
val
TAG
=
"NewComUtils"
private
val
TAG
=
"NewComUtils"
private
const
val
API_URL
=
ConfigHelper
.
apiUrl
private
const
val
API_URL
=
GlobalConfig
.
URL_API
private
const
val
PACKAGE_NAME_PREFIX
=
ConfigHelper
.
packageName
private
const
val
PACKAGE_NAME_PREFIX
=
GlobalConfig
.
PACKAGE_NAME
private
const
val
DATA_KEY
=
"data"
private
const
val
DATA_KEY
=
"data"
private
const
val
SUCCESS_KEY
=
"success"
private
const
val
SUCCESS_KEY
=
"success"
private
const
val
ERROR_MSG_KEY
=
"errorMsg"
private
const
val
ERROR_MSG_KEY
=
"errorMsg"
private
val
url
:
String
by
lazy
{
private
val
url
:
String
by
lazy
{
val
packageName
=
ConfigHelper
.
packageName
val
packageName
=
GlobalConfig
.
PACKAGE_NAME
val
appCode
=
packageName
.
substringAfter
(
PACKAGE_NAME_PREFIX
).
take
(
5
).
toLowerCase
(
Locale
.
getDefault
())
val
appCode
=
packageName
.
substringAfter
(
PACKAGE_NAME_PREFIX
).
take
(
5
).
toLowerCase
(
Locale
.
getDefault
())
val
bRefer
=
android
.
util
.
Base64
.
encodeToString
(
val
bRefer
=
android
.
util
.
Base64
.
encodeToString
(
...
@@ -39,11 +42,16 @@ object NewComUtils {
...
@@ -39,11 +42,16 @@ object NewComUtils {
android
.
util
.
Base64
.
DEFAULT
android
.
util
.
Base64
.
DEFAULT
)
)
var
s
=
"$API_URL/${appCode}spk?pkg=$packageName&referrer=${bRefer}&vn=${BuildConfig.VERSION_NAME}&vc=${BuildConfig.VERSION_CODE}&device=${
"$API_URL/${appCode}spk?pkg=$packageName&referrer=${bRefer}&vn=${BuildConfig.VERSION_NAME}&vc=${BuildConfig.VERSION_CODE}&device=${
AppPreferences
.
getInstance
().
getString
(
"gid"
,
""
)
AppPreferences
.
getInstance
().
getString
(
"gid"
,
""
)
}&
aid
=
$
{
AppPreferences
.
getInstance
().
getString
(
"uuid"
,
""
)}
"
}&
aid
=
$
{
AppPreferences
.
getInstance
().
getString
(
"uuid"
,
""
)}
"
if
(
BuildConfig
.
DEBUG
)
{
s
=
"$s&mode=4"
}
s
}
}
//origin user = only pick &source=origin
//origin user = only pick &source=origin
...
@@ -54,7 +62,7 @@ object NewComUtils {
...
@@ -54,7 +62,7 @@ object NewComUtils {
// }
// }
fun
requestCfg
(
callback
:
(
ConfigBean
?)
->
Unit
)
{
fun
requestCfg
(
callback
:
(
ConfigBean
?)
->
Unit
)
{
MainScope
().
launch
(
CoroutineExceptionHandler
{
_
,
_
->
}
+
Dispatchers
.
IO
)
{
MainScope
().
launch
(
CoroutineExceptionHandler
{
_
,
_
->
}
+
Dispatchers
.
IO
)
{
val
response
=
doGet
()
val
response
=
doGet
()
if
(
response
==
null
)
{
if
(
response
==
null
)
{
withContext
(
Dispatchers
.
Main
)
{
withContext
(
Dispatchers
.
Main
)
{
...
@@ -116,7 +124,7 @@ object NewComUtils {
...
@@ -116,7 +124,7 @@ object NewComUtils {
AppPreferences
.
getInstance
().
put
(
t
,
u
)
AppPreferences
.
getInstance
().
put
(
t
,
u
)
LogEx
.
logDebug
(
TAG
,
"t=$t u=$u"
)
LogEx
.
logDebug
(
TAG
,
"t=$t u=$u"
)
}
}
}
catch
(
_
:
Exception
)
{
}
catch
(
_
:
Exception
)
{
}
}
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/help/WeatherUtils.kt
View file @
c1d33939
package
com.base.filerecoveryrecyclebin.help
package
com.base.filerecoveryrecyclebin.help
import
android.annotation.SuppressLint
import
android.text.TextUtils
import
android.text.TextUtils
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.bean.WeatherBean
import
com.base.filerecoveryrecyclebin.bean.WeatherBean
import
com.base.filerecoveryrecyclebin.utils.AESHelper
import
com.base.filerecoveryrecyclebin.utils.AESHelper
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
...
@@ -18,6 +20,7 @@ import java.util.Calendar
...
@@ -18,6 +20,7 @@ import java.util.Calendar
import
java.util.concurrent.TimeUnit
import
java.util.concurrent.TimeUnit
@SuppressLint
(
"SimpleDateFormat"
)
object
WeatherUtils
{
object
WeatherUtils
{
private
val
TAG
=
"WeatherUtils"
private
val
TAG
=
"WeatherUtils"
fun
getWeatherType
(
param
:
Int
):
String
{
fun
getWeatherType
(
param
:
Int
):
String
{
...
@@ -66,9 +69,9 @@ object WeatherUtils {
...
@@ -66,9 +69,9 @@ object WeatherUtils {
private
val
url
by
lazy
{
private
val
url
by
lazy
{
val
pkg
=
ConfigHelper
.
packageName
val
pkg
=
GlobalConfig
.
PACKAGE_NAME
val
url
=
StringBuilder
(
val
url
=
StringBuilder
(
"${
ConfigHelper.apiUrl
}/city/${
"${
GlobalConfig.URL_API
}/city/${
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
}
tq
"
}
tq
"
)
)
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/utils/EventUtils.kt
View file @
c1d33939
...
@@ -3,8 +3,8 @@ package com.base.filerecoveryrecyclebin.utils
...
@@ -3,8 +3,8 @@ package com.base.filerecoveryrecyclebin.utils
import
android.os.Build
import
android.os.Build
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.GlobalConfig
import
com.base.filerecoveryrecyclebin.bean.ConstObject.ifAgreePrivacy
import
com.base.filerecoveryrecyclebin.bean.ConstObject.ifAgreePrivacy
import
com.base.filerecoveryrecyclebin.help.ConfigHelper
import
com.base.filerecoveryrecyclebin.utils.ReportUtils.doPost
import
com.base.filerecoveryrecyclebin.utils.ReportUtils.doPost
import
org.json.JSONException
import
org.json.JSONException
import
org.json.JSONObject
import
org.json.JSONObject
...
@@ -26,6 +26,7 @@ object EventUtils {
...
@@ -26,6 +26,7 @@ object EventUtils {
}
}
val
isPushReportSwitch
val
isPushReportSwitch
get
()
=
AppPreferences
.
getInstance
().
getString
(
"push_report_switch"
,
"0"
).
toInt
()
get
()
=
AppPreferences
.
getInstance
().
getString
(
"push_report_switch"
,
"0"
).
toInt
()
fun
event
(
fun
event
(
key
:
String
,
key
:
String
,
value
:
String
?
=
null
,
value
:
String
?
=
null
,
...
@@ -36,7 +37,7 @@ object EventUtils {
...
@@ -36,7 +37,7 @@ object EventUtils {
if
(!
ifAgreePrivacy
)
{
if
(!
ifAgreePrivacy
)
{
return
return
}
}
if
(
isPushReportSwitch
==
0
&&
push_limit
.
any
{
key
.
startsWith
(
it
,
ignoreCase
=
true
)
})
{
if
(
isPushReportSwitch
==
0
&&
push_limit
.
any
{
key
.
startsWith
(
it
,
ignoreCase
=
true
)
})
{
return
return
}
}
...
@@ -50,7 +51,7 @@ object EventUtils {
...
@@ -50,7 +51,7 @@ object EventUtils {
Thread
{
Thread
{
var
parmJson
:
String
?
=
""
var
parmJson
:
String
?
=
""
try
{
try
{
val
pkg
=
ConfigHelper
.
packageName
val
pkg
=
GlobalConfig
.
PACKAGE_NAME
val
s
=
JSONObject
()
val
s
=
JSONObject
()
.
put
(
"action"
,
key
)
.
put
(
"action"
,
key
)
.
put
(
"value"
,
value
)
.
put
(
"value"
,
value
)
...
@@ -88,15 +89,16 @@ object EventUtils {
...
@@ -88,15 +89,16 @@ object EventUtils {
}
}
private
val
url
by
lazy
{
private
val
url
by
lazy
{
val
pkg
=
ConfigHelper
.
packageName
val
pkg
=
GlobalConfig
.
PACKAGE_NAME
val
url
=
StringBuilder
(
val
url
=
StringBuilder
(
"${
ConfigHelper.eventUrl
}/${
"${
GlobalConfig.URL_EVENT
}/${
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
}
sp
"
}
sp
"
)
)
url
.
append
(
"?pkg=$pkg"
)
url
.
append
(
"?pkg=$pkg"
)
url
.
toString
()
url
.
toString
()
}
}
fun
getDeviceName
():
String
?
{
fun
getDeviceName
():
String
?
{
val
manufacturer
=
Build
.
MANUFACTURER
val
manufacturer
=
Build
.
MANUFACTURER
val
model
=
Build
.
MODEL
val
model
=
Build
.
MODEL
...
...
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