Commit cc6dc0ac authored by guest's avatar guest

1

parent b128354b
{ {
"project_info": { "project_info": {
"project_number": "135677224109", "project_number": "944507974954",
"project_id": "scream-1bc70", "project_id": "dumpster-photo-recovery",
"storage_bucket": "scream-1bc70.firebasestorage.app" "storage_bucket": "dumpster-photo-recovery.appspot.com"
}, },
"client": [ "client": [
{ {
"client_info": { "client_info": {
"mobilesdk_app_id": "1:135677224109:android:5e3fd3c8cfce99d40a1224", "mobilesdk_app_id": "1:944507974954:android:1309986ccc55e242589a53",
"android_client_info": { "android_client_info": {
"package_name": "confine.scream" "package_name": "com.baloota.photorecyclebin.awm.sp"
} }
}, },
"oauth_client": [], "oauth_client": [],
"api_key": [ "api_key": [
{ {
"current_key": "AIzaSyBIUMrPv6OOQWBheBAylXU94bkwvZgBFsg" "current_key": "AIzaSyDBejd5HFvww_CVve-aFYRBjR-d6XwIBFA"
} }
], ],
"services": { "services": {
......
...@@ -61,3 +61,4 @@ ...@@ -61,3 +61,4 @@
-keep class com.bytedance.sdk.** { *; } -keep class com.bytedance.sdk.** { *; }
-dontwarn com.google.android.gms.ads.R$layout -dontwarn com.google.android.gms.ads.R$layout
-dontwarn com.google.android.gms.ads.R$styleable -dontwarn com.google.android.gms.ads.R$styleable
-keep class com.base.filerecoveryrecyclebin.bean.** {*;}
\ No newline at end of file
...@@ -306,14 +306,14 @@ ...@@ -306,14 +306,14 @@
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
<action android:name="com.google.android.c2dm.intent.RECEIVE" /> <action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.test.easy.cleanerjunk" /> <category android:name="com.baloota.photorecyclebin.awm.sp" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 --> <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID" android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713" /> android:value="ca-app-pub-3838048042416287~9437965450" />
<meta-data <meta-data
android:name="com.facebook.sdk.ApplicationId" android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" /> android:value="@string/facebook_app_id" />
......
...@@ -123,6 +123,7 @@ object AdmobEvent { ...@@ -123,6 +123,7 @@ object AdmobEvent {
val mediationGroupName = extras.getString("mediation_group_name") val mediationGroupName = extras.getString("mediation_group_name")
val mediationABTestName = extras.getString("mediation_ab_test_name") val mediationABTestName = extras.getString("mediation_ab_test_name")
val mediationABTestVariant = extras.getString("mediation_ab_test_variant") val mediationABTestVariant = extras.getString("mediation_ab_test_variant")
obj.put("ad_unit", "openAd")
obj.put("adUnitId", adUnitId) obj.put("adUnitId", adUnitId)
obj.put("adSourceName", adSourceName) obj.put("adSourceName", adSourceName)
obj.put("adSourceId", adSourceId) obj.put("adSourceId", adSourceId)
...@@ -147,6 +148,7 @@ object AdmobEvent { ...@@ -147,6 +148,7 @@ object AdmobEvent {
val mediationABTestName = extras.getString("mediation_ab_test_name") val mediationABTestName = extras.getString("mediation_ab_test_name")
val mediationABTestVariant = extras.getString("mediation_ab_test_variant") val mediationABTestVariant = extras.getString("mediation_ab_test_variant")
obj.put("adUnitId", adUnitId) obj.put("adUnitId", adUnitId)
obj.put("ad_unit", "interAd")
obj.put("adSourceName", adSourceName) obj.put("adSourceName", adSourceName)
obj.put("adSourceId", adSourceId) obj.put("adSourceId", adSourceId)
obj.put("adSourceInstanceName", adSourceInstanceName) obj.put("adSourceInstanceName", adSourceInstanceName)
...@@ -190,6 +192,7 @@ object AdmobEvent { ...@@ -190,6 +192,7 @@ object AdmobEvent {
val mediationABTestName = extras?.getString("mediation_ab_test_name") val mediationABTestName = extras?.getString("mediation_ab_test_name")
val mediationABTestVariant = extras?.getString("mediation_ab_test_variant") val mediationABTestVariant = extras?.getString("mediation_ab_test_variant")
obj.put("adSourceName", adSourceName) obj.put("adSourceName", adSourceName)
obj.put("ad_unit", "nativeAd")
obj.put("adSourceId", adSourceId) obj.put("adSourceId", adSourceId)
obj.put("adSourceInstanceName", adSourceInstanceName) obj.put("adSourceInstanceName", adSourceInstanceName)
obj.put("adSourceInstanceId", adSourceInstanceId) obj.put("adSourceInstanceId", adSourceInstanceId)
...@@ -218,11 +221,7 @@ object AdmobEvent { ...@@ -218,11 +221,7 @@ object AdmobEvent {
obj.put("credentials", credentials.toString()) obj.put("credentials", credentials.toString())
obj.put("session_id", responseInfo?.responseId) obj.put("session_id", responseInfo?.responseId)
obj.put("networkname", responseInfo?.mediationAdapterClassName) obj.put("networkname", responseInfo?.mediationAdapterClassName)
if (adUnit != "nativeAd") {
EventUtils.event("ad_click", ext = obj) EventUtils.event("ad_click", ext = obj)
} else {
EventUtils.event("bigimage_ad_click", ext = obj)
}
} }
fun showAd(responseInfo: ResponseInfo?, adUnit: String, activity: Activity? = null) { fun showAd(responseInfo: ResponseInfo?, adUnit: String, activity: Activity? = null) {
...@@ -239,10 +238,6 @@ object AdmobEvent { ...@@ -239,10 +238,6 @@ object AdmobEvent {
obj.put("credentials", credentials.toString()) obj.put("credentials", credentials.toString())
obj.put("session_id", responseInfo?.responseId) obj.put("session_id", responseInfo?.responseId)
obj.put("from", activity?.javaClass?.simpleName) obj.put("from", activity?.javaClass?.simpleName)
if (adUnit != "nativeAd") {
EventUtils.event("ad_show", ext = obj) EventUtils.event("ad_show", ext = obj)
} else {
EventUtils.event("bigimage_ad_show", ext = obj)
}
} }
} }
\ No newline at end of file
...@@ -79,7 +79,7 @@ object AdmobNativeUtils { ...@@ -79,7 +79,7 @@ object AdmobNativeUtils {
fun showNativeAd(activity: Activity?, parent: ViewGroup, layout: Int = R.layout.layout_native_custom) { fun showNativeAd(activity: Activity?, parent: ViewGroup, layout: Int = R.layout.layout_native_custom) {
val obj = JSONObject() val obj = JSONObject()
obj.put("ad_unit", "NativeAd") obj.put("ad_unit", "NativeAd")
EventUtils.event("ad_prepare_show_native", ext = obj) EventUtils.event("ad_prepare_show", ext = obj)
if (!AdDisplayUtils.getInstance().shouldShowAd("NativeAd")) { if (!AdDisplayUtils.getInstance().shouldShowAd("NativeAd")) {
return return
} }
......
...@@ -4,8 +4,7 @@ import android.annotation.SuppressLint; ...@@ -4,8 +4,7 @@ import android.annotation.SuppressLint;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.base.filerecoveryrecyclebin.MyApplication; import com.base.filerecoveryrecyclebin.help.BaseApplication;
import com.base.filerecoveryrecyclebin.ads.AdDisplayUtils;
import com.base.filerecoveryrecyclebin.utils.AppPreferences; import com.base.filerecoveryrecyclebin.utils.AppPreferences;
import com.base.filerecoveryrecyclebin.utils.EventUtils; import com.base.filerecoveryrecyclebin.utils.EventUtils;
import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.FirebaseMessagingService;
...@@ -79,7 +78,7 @@ public class MessagingService extends FirebaseMessagingService { ...@@ -79,7 +78,7 @@ public class MessagingService extends FirebaseMessagingService {
// Consider implementing this method if local notifications are needed // Consider implementing this method if local notifications are needed
private void sendLocalNotification() { private void sendLocalNotification() {
NotificationUtil.INSTANCE.sendNotification(MyApplication.context, "MessagingService"); NotificationUtil.INSTANCE.sendNotification(BaseApplication.context, "MessagingService");
} }
} }
\ No newline at end of file
...@@ -7,7 +7,6 @@ import com.base.filerecoveryrecyclebin.R ...@@ -7,7 +7,6 @@ import com.base.filerecoveryrecyclebin.R
import com.base.filerecoveryrecyclebin.activity.MainActivity import com.base.filerecoveryrecyclebin.activity.MainActivity
import com.base.filerecoveryrecyclebin.activity.guide.GuideActivity import com.base.filerecoveryrecyclebin.activity.guide.GuideActivity
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.bean.ConstObject
import com.base.filerecoveryrecyclebin.databinding.FragmentGuideBinding import com.base.filerecoveryrecyclebin.databinding.FragmentGuideBinding
import com.base.filerecoveryrecyclebin.help.BaseFragment import com.base.filerecoveryrecyclebin.help.BaseFragment
import com.base.filerecoveryrecyclebin.utils.AppPreferences import com.base.filerecoveryrecyclebin.utils.AppPreferences
...@@ -65,16 +64,6 @@ class GuideFragment : BaseFragment<FragmentGuideBinding>() { ...@@ -65,16 +64,6 @@ class GuideFragment : BaseFragment<FragmentGuideBinding>() {
} }
private fun jumpNext() { private fun jumpNext() {
if (false) {
// startActivity(Intent(requireContext(), VipActivity::class.java).apply {
// putExtra("isSkip", true)
// })
// requireActivity().finish()
// isInstallVip = false
} else {
if(!ConstObject.isCLeanGuide){
(requireActivity() as GuideActivity).lauchPermisson()
}else{
val showAd = AppPreferences.getInstance().getString("isShowGuideAd", "0")?.toInt() val showAd = AppPreferences.getInstance().getString("isShowGuideAd", "0")?.toInt()
if (showAd == 1) { if (showAd == 1) {
AdmobMaxHelper.admobMaxShowInterstitialAd(requireActivity(), isLoading = false) { AdmobMaxHelper.admobMaxShowInterstitialAd(requireActivity(), isLoading = false) {
...@@ -86,7 +75,4 @@ class GuideFragment : BaseFragment<FragmentGuideBinding>() { ...@@ -86,7 +75,4 @@ class GuideFragment : BaseFragment<FragmentGuideBinding>() {
requireActivity().finish() requireActivity().finish()
} }
} }
}
}
} }
\ No newline at end of file
...@@ -18,10 +18,10 @@ object ConfigHelper { ...@@ -18,10 +18,10 @@ object ConfigHelper {
const val nativeAdmobIdTest = "ca-app-pub-3940256099942544/2247696110" const val nativeAdmobIdTest = "ca-app-pub-3940256099942544/2247696110"
// admob广告id // admob广告id
const val interAdmobId = "ca-app-pub-3940256099942544/1033173712" const val interAdmobId = "ca-app-pub-3838048042416287/8234531162"
const val nativeAdmobId = "ca-app-pub-3940256099942544/2247696110" const val nativeAdmobId = "ca-app-pub-3838048042416287/6196724440"
const val openAdmobId = "ca-app-pub-3940256099942544/9257395921" const val openAdmobId = "ca-app-pub-3838048042416287/8720350971"
const val bannerAdmobId = "ca-app-pub-3940256099942544/9214589741" const val bannerAdmobId = "ca-app-pub-3838048042416287/6921449490"
//max id //max id
const val interAdMaxId = "b31e7f6d11ee659e" const val interAdMaxId = "b31e7f6d11ee659e"
......
package com.base.filerecoveryrecyclebin.help package com.base.filerecoveryrecyclebin.help
import android.os.Build
import androidx.annotation.RequiresApi
import com.android.installreferrer.api.InstallReferrerClient import com.android.installreferrer.api.InstallReferrerClient
import com.android.installreferrer.api.InstallReferrerStateListener import com.android.installreferrer.api.InstallReferrerStateListener
import com.base.filerecoveryrecyclebin.BuildConfig import com.base.filerecoveryrecyclebin.BuildConfig
...@@ -10,6 +8,9 @@ import com.base.filerecoveryrecyclebin.fcm.RecoveryTimerManager ...@@ -10,6 +8,9 @@ import com.base.filerecoveryrecyclebin.fcm.RecoveryTimerManager
import com.base.filerecoveryrecyclebin.fcm.ScreenStatusReceiver import com.base.filerecoveryrecyclebin.fcm.ScreenStatusReceiver
import com.base.filerecoveryrecyclebin.utils.AppPreferences import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.utils.EventUtils import com.base.filerecoveryrecyclebin.utils.EventUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import org.json.JSONObject import org.json.JSONObject
/** /**
...@@ -19,19 +20,8 @@ object InstallHelps { ...@@ -19,19 +20,8 @@ object InstallHelps {
private val TAG = "InstallHelps" private val TAG = "InstallHelps"
fun init() = Thread { fun init() {
//InstallReferrer not empty MainScope().launch(Dispatchers.IO) {
// if (!TextUtils.isEmpty(AppPreferences.getInstance().getString("install_source", ""))) {
// if (AdmobMaxHelper.haveSpAdmobTrueMaxFalse()) {
// AdmobMaxHelper.initAdmobMaxAd()
// requestCfg(false)
// } else {
// requestCfg(true)
// }
// return
// }
val referrerClient = InstallReferrerClient.newBuilder(BaseApplication.context).build() val referrerClient = InstallReferrerClient.newBuilder(BaseApplication.context).build()
referrerClient.startConnection(object : InstallReferrerStateListener { referrerClient.startConnection(object : InstallReferrerStateListener {
override fun onInstallReferrerSetupFinished(responseCode: Int) { override fun onInstallReferrerSetupFinished(responseCode: Int) {
...@@ -75,7 +65,9 @@ object InstallHelps { ...@@ -75,7 +65,9 @@ object InstallHelps {
override fun onInstallReferrerServiceDisconnected() { override fun onInstallReferrerServiceDisconnected() {
} }
}) })
}.start() }
}
fun requestCfg(callBackAd: Boolean) { fun requestCfg(callBackAd: Boolean) {
......
package com.base.filerecoveryrecyclebin.help package com.base.filerecoveryrecyclebin.help
import android.os.Build
import android.util.Log import android.util.Log
import com.base.filerecoveryrecyclebin.BuildConfig import com.base.filerecoveryrecyclebin.BuildConfig
import com.base.filerecoveryrecyclebin.ads.AdDisplayUtils import com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
...@@ -12,7 +11,6 @@ import com.base.filerecoveryrecyclebin.utils.LogEx ...@@ -12,7 +11,6 @@ import com.base.filerecoveryrecyclebin.utils.LogEx
import com.google.gson.Gson import com.google.gson.Gson
import com.google.gson.reflect.TypeToken import com.google.gson.reflect.TypeToken
import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
...@@ -22,7 +20,6 @@ import java.io.BufferedReader ...@@ -22,7 +20,6 @@ import java.io.BufferedReader
import java.io.InputStreamReader import java.io.InputStreamReader
import java.net.HttpURLConnection import java.net.HttpURLConnection
import java.net.URL import java.net.URL
import java.util.Base64
import java.util.Locale import java.util.Locale
object NewComUtils { object NewComUtils {
...@@ -114,12 +111,16 @@ object NewComUtils { ...@@ -114,12 +111,16 @@ object NewComUtils {
val gson = Gson() val gson = Gson()
val type = object : TypeToken<Map<String, String>>() {}.type val type = object : TypeToken<Map<String, String>>() {}.type
val configMap = gson.fromJson<Map<String, String>>(json, type) val configMap = gson.fromJson<Map<String, String>>(json, type)
try {
configMap.forEach { t, u -> configMap.forEach { t, u ->
// 对于整型值使用parseInt, 长整型使用parseLong // 对于整型值使用parseInt, 长整型使用parseLong
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){
}
val jsonObject = JSONObject() val jsonObject = JSONObject()
jsonObject.put("ut", AppPreferences.getInstance().getString("ut", "")) jsonObject.put("ut", AppPreferences.getInstance().getString("ut", ""))
......
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