Commit 57e27536 authored by wanglei's avatar wanglei

[商业化]修改请求配置解析的问题,ump,请求配置回调

parent a3f1b488
...@@ -7,7 +7,6 @@ import android.content.Intent ...@@ -7,7 +7,6 @@ import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.util.Log import android.util.Log
import com.base.appzxhy.business.helper.EventUtils
import com.base.appzxhy.business.helper.InstallHelps import com.base.appzxhy.business.helper.InstallHelps
import com.base.appzxhy.business.helper.NewComUtils import com.base.appzxhy.business.helper.NewComUtils
import com.base.appzxhy.business.service.StayJobService.Companion.startStayJobService import com.base.appzxhy.business.service.StayJobService.Companion.startStayJobService
...@@ -18,18 +17,13 @@ import com.base.appzxhy.utils.SolarEngineUtils.initSolarEngine ...@@ -18,18 +17,13 @@ import com.base.appzxhy.utils.SolarEngineUtils.initSolarEngine
import com.base.appzxhy.utils.SolarEngineUtils.solarkey import com.base.appzxhy.utils.SolarEngineUtils.solarkey
import com.facebook.FacebookSdk import com.facebook.FacebookSdk
import com.google.android.gms.ads.identifier.AdvertisingIdClient import com.google.android.gms.ads.identifier.AdvertisingIdClient
import com.google.gson.Gson
import com.hjq.language.MultiLanguages import com.hjq.language.MultiLanguages
import com.hjq.language.OnLanguageListener import com.hjq.language.OnLanguageListener
import com.reyun.solar.engine.SolarEngineManager import com.reyun.solar.engine.SolarEngineManager
import org.json.JSONObject
import java.util.Locale import java.util.Locale
import java.util.UUID import java.util.UUID
import com.base.appzxhy.SpConstObject.appLanguageSp import com.base.appzxhy.SpConstObject.appLanguageSp
import com.base.appzxhy.SpConstObject.appLanguageCountrySp import com.base.appzxhy.SpConstObject.appLanguageCountrySp
import com.base.appzxhy.bean.config.AdConfigBean
import com.base.appzxhy.bean.config.ConfigBean
import com.base.appzxhy.bean.config.PopupConfigBean
import com.base.appzxhy.business.ads.AdsMgr import com.base.appzxhy.business.ads.AdsMgr
import com.base.appzxhy.business.helper.NewComUtils.spConfig import com.base.appzxhy.business.helper.NewComUtils.spConfig
import com.base.appzxhy.business.push.fcm.FCMManager import com.base.appzxhy.business.push.fcm.FCMManager
...@@ -44,7 +38,6 @@ import com.facebook.appevents.AppEventsLogger ...@@ -44,7 +38,6 @@ import com.facebook.appevents.AppEventsLogger
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
class MyApplication : Application() { class MyApplication : Application() {
...@@ -74,10 +67,11 @@ class MyApplication : Application() { ...@@ -74,10 +67,11 @@ class MyApplication : Application() {
appContext = this appContext = this
// initUUid() initUUid()
// initGid() initGid()
// initApp() initApp()
// initLanguage() initLifeListener()
initLanguage()
} }
...@@ -125,17 +119,35 @@ class MyApplication : Application() { ...@@ -125,17 +119,35 @@ class MyApplication : Application() {
fun initApp() { fun initApp() {
kotlin.runCatching {
startStayJobService()
}
//初始化广告相关业务 //初始化广告相关业务
AdsMgr.init(appContext) AdsMgr.init(appContext)
initPush()
initAppConfig()
initFacebook()
initSolar()
}
private fun initSolar() {
SolarEngineManager.getInstance().preInit(this, solarkey)
appContext.initSolarEngine(true)
}
private fun initFacebook() {
//初始化facebook sdk //初始化facebook sdk
FacebookSdk.sdkInitialize(applicationContext) FacebookSdk.sdkInitialize(applicationContext)
AppEventsLogger.activateApp(this) AppEventsLogger.activateApp(this)
}
private fun initPush() {
kotlin.runCatching {
startStayJobService()
}
// val token = AppPreferences.getInstance().getString("token", "") // val token = AppPreferences.getInstance().getString("token", "")
val topic = GlobalConfig.PACKAGE_NAME + "_push" val topic = GlobalConfig.PACKAGE_NAME + "_push"
...@@ -143,12 +155,7 @@ class MyApplication : Application() { ...@@ -143,12 +155,7 @@ class MyApplication : Application() {
FCMManager.initFirebase(this) FCMManager.initFirebase(this)
FCMManager.subscribeToTopic(topic) FCMManager.subscribeToTopic(topic)
initAppConfig() changeTimer()
SolarEngineManager.getInstance().preInit(this, solarkey)
initLifeListener()
ScreenStatusReceiver.registerScreenStatusReceiver(this) ScreenStatusReceiver.registerScreenStatusReceiver(this)
// PackageStatusReceiver.registerPackageStatusReceiver(this) // PackageStatusReceiver.registerPackageStatusReceiver(this)
registerBatteryReceiver(this) registerBatteryReceiver(this)
...@@ -162,16 +169,20 @@ class MyApplication : Application() { ...@@ -162,16 +169,20 @@ class MyApplication : Application() {
//开启通知队列 //开启通知队列
MyNotificationManager.startNotificationQueue() MyNotificationManager.startNotificationQueue()
appContext.initSolarEngine(true)
} }
private fun initAppConfig() { private fun initAppConfig() {
initConfig()
//初始化sp的配置
NewComUtils.parseConfigBean(spConfig)
NewComUtils.requestCfgCallBackMap.put("changeTimer") {
LogEx.logDebug(TAG, "requestCfgCallBackMap changeTimer")
changeTimer()
}
InstallHelps.init { InstallHelps.init {
initRemoteConfig() NewComUtils.requestCfg()
} }
} }
...@@ -240,46 +251,5 @@ class MyApplication : Application() { ...@@ -240,46 +251,5 @@ class MyApplication : Application() {
}) })
} }
private fun initRemoteConfig() {
NewComUtils.requestCfg { config ->
LogEx.logDebug("requestCfg", "config=$config")
if (config != null) {
initConfig(config)
} else {
EventUtils.event("configNull")
}
}
}
private fun initConfig(config: String = spConfig) = MainScope().launch(Dispatchers.IO) {
if (config.isEmpty()) return@launch
// kotlin.runCatching {
val configBean = Gson().fromJson(config, ConfigBean::class.java)
val jsonObject = JSONObject()
jsonObject.put("ut", configBean.ut)
EventUtils.event("user_type", ext = jsonObject)
//配置
ConfigBean.configBean = configBean
//广告
AdConfigBean.adsConfigBean = configBean.adConfigBean
LogEx.logDebug("initConfig", "adsConfigBean=${configBean.adConfigBean.functionInShowAd}")
//通知配置
PopupConfigBean.popupConfigBean = configBean.popupConfigBean
LogEx.logDebug("initConfig", "popupConfigBean=${configBean.popupConfigBean.popupCount}")
//启动定时器
changeTimer()
// }
}
} }
\ No newline at end of file
...@@ -18,6 +18,7 @@ class AdConfigBean( ...@@ -18,6 +18,7 @@ class AdConfigBean(
var functionBackShowAd: Boolean = true,//功能退出显示广告 var functionBackShowAd: Boolean = true,//功能退出显示广告
var functionInShowAd: Boolean = true,//功能进入显示广告 var functionInShowAd: Boolean = true,//功能进入显示广告
var rvEmptyShowNative: Boolean = true,//列表空的显示原生不 var rvEmptyShowNative: Boolean = true,//列表空的显示原生不
var requestUmp: Boolean = false,//是否需要请求ump
) { ) {
......
...@@ -94,7 +94,7 @@ object AdsMgr { ...@@ -94,7 +94,7 @@ object AdsMgr {
return return
} }
initAdmob(context) initAdmob(context)
// initMax(context) initMax(context)
} }
......
...@@ -4,20 +4,25 @@ import android.util.Base64 ...@@ -4,20 +4,25 @@ import android.util.Base64
import android.util.Log import android.util.Log
import com.base.appzxhy.BuildConfig import com.base.appzxhy.BuildConfig
import com.base.appzxhy.GlobalConfig import com.base.appzxhy.GlobalConfig
import com.base.appzxhy.bean.config.AdConfigBean
import com.base.appzxhy.bean.config.ConfigBean import com.base.appzxhy.bean.config.ConfigBean
import com.base.appzxhy.bean.config.PopupConfigBean
import com.base.appzxhy.utils.AppPreferences import com.base.appzxhy.utils.AppPreferences
import com.base.appzxhy.utils.LogEx import com.base.appzxhy.utils.LogEx
import kotlinx.coroutines.CoroutineScope import com.google.gson.Gson
import kotlinx.coroutines.Dispatchers import okhttp3.Call
import kotlinx.coroutines.launch import okhttp3.Callback
import java.io.BufferedReader import okhttp3.OkHttpClient
import java.io.InputStreamReader import okhttp3.Request
import java.net.HttpURLConnection import okhttp3.Response
import java.net.URL import org.json.JSONObject
import java.io.IOException
import java.util.Locale import java.util.Locale
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
object NewComUtils { object NewComUtils {
private val TAG = "NewComUtils" private val TAG = "NewComUtils"
private const val API_URL = GlobalConfig.URL_API private const val API_URL = GlobalConfig.URL_API
private const val PACKAGE_NAME_PREFIX = GlobalConfig.PACKAGE_NAME private const val PACKAGE_NAME_PREFIX = GlobalConfig.PACKAGE_NAME
...@@ -43,7 +48,8 @@ object NewComUtils { ...@@ -43,7 +48,8 @@ object NewComUtils {
AppPreferences.getInstance().put("lastRequestTime", value, true) AppPreferences.getInstance().put("lastRequestTime", value, true)
} }
private val url: String by lazy {
fun getUrl(): String {
val packageName = GlobalConfig.PACKAGE_NAME 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())
...@@ -63,17 +69,15 @@ object NewComUtils { ...@@ -63,17 +69,15 @@ object NewComUtils {
s = "$s&mode=4" s = "$s&mode=4"
} }
s s
// mode =3 google mode=2 facebook mode=1 自然,mode=4 测试 // mode =3 google mode=2 facebook mode=1 自然,mode=4 测试
// &mode=3 // &mode=3
return s
} }
var requestCfgCallBack: (() -> Unit)? = null //请求中的回调
var requestCfgIng = AtomicBoolean(false) var requestCfgIng = AtomicBoolean(false)
fun requestCfg(callback: (json: String?) -> Unit) { fun canRequestCfg(): Boolean {
CoroutineScope(Dispatchers.IO).launch {
requestCfgIng.set(true)
val passHour = (System.currentTimeMillis() - lastRequestTime) / 3600000 val passHour = (System.currentTimeMillis() - lastRequestTime) / 3600000
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
...@@ -81,61 +85,127 @@ object NewComUtils { ...@@ -81,61 +85,127 @@ object NewComUtils {
} }
if (lastRequestTime != 0L && passHour < ConfigBean.configBean.getConfigInterval) { if (lastRequestTime != 0L && passHour < ConfigBean.configBean.getConfigInterval) {
callback.invoke(null)
Log.e(TAG, "请求间隔 passHour=$passHour") Log.e(TAG, "请求间隔 passHour=$passHour")
return@launch return false
} }
return true
}
fun requestCfg() {
val response = doGet() requestCfgIng.set(true)
if (response == null) {
callback(null) if (!canRequestCfg()) {
return@launch return
} }
val data = extractData(response) val urlPath = getUrl()
if (data == null) { LogEx.logDebug(TAG, "url=$urlPath")
callback(null)
return@launch val request = Request.Builder()
.url(urlPath)
.get()
.build()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
e.printStackTrace()
Log.d(TAG, "onFailure $e")
handleCfgCallBack()
} }
override fun onResponse(call: Call, response: Response) {
if (response.isSuccessful) {
val json = response.body?.string() ?: ""
LogEx.logDebug(TAG, "json=$json")
val data = extractData(json)
if (data != null) {
lastRequestTime = System.currentTimeMillis() lastRequestTime = System.currentTimeMillis()
val decryptedData = AESHelper.decrypt(data) val decryptedData = AESHelper.decrypt(data)
LogEx.logDebug(TAG, "decryptedData=$decryptedData") LogEx.logDebug(TAG, "decryptedData=$decryptedData")
spConfig = decryptedData
callback(decryptedData) parseConfigBean(decryptedData)
}
requestCfgIng.set(false)
requestCfgCallBack?.invoke() }
requestCfgCallBack = null
handleCfgCallBack()
}
})
} }
private val client = OkHttpClient.Builder()
.connectTimeout(10, TimeUnit.SECONDS)
.callTimeout(10, TimeUnit.SECONDS)
.readTimeout(10, TimeUnit.SECONDS)
.writeTimeout(10, TimeUnit.SECONDS)
.build()
private fun extractData(response: String): String? {
val regex = Regex("\"$DATA_KEY\":\"(.*?)\"")
val match = regex.find(response)
return match?.groupValues?.get(1)
} }
private fun doGet(): String? {
val urlPath = url fun parseConfigBean(config: String) {
LogEx.logDebug(TAG, "url=$url")
if (config.isNotEmpty()) {
try { try {
val conn: HttpURLConnection = URL(urlPath).openConnection() as HttpURLConnection val configBean = Gson().fromJson(config, ConfigBean::class.java)
conn.setRequestMethod("GET")
conn.connectTimeout = 150000 val jsonObject = JSONObject()
if (200 == conn.getResponseCode()) { jsonObject.put("ut", configBean.ut)
val json = BufferedReader(InputStreamReader(conn.inputStream)).readLine() EventUtils.event("user_type", ext = jsonObject)
LogEx.logDebug(TAG, "json=$json")
return json //配置
ConfigBean.configBean = configBean
//广告
AdConfigBean.adsConfigBean = configBean.adConfigBean
LogEx.logDebug("initConfig", "adsConfigBean=${configBean.adConfigBean.functionInShowAd}")
//通知配置
PopupConfigBean.popupConfigBean = configBean.popupConfigBean
LogEx.logDebug("initConfig", "popupConfigBean=${configBean.popupConfigBean.popupCount}")
if (spConfig != config) {
spConfig = config
} }
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
Log.d("okhttp", e.toString()) EventUtils.event("parseConfigBean_error", value = config)
} }
return null
} }
private fun extractData(response: String): String? { }
val regex = Regex("\"$DATA_KEY\":\"(.*?)\"")
val match = regex.find(response)
return match?.groupValues?.get(1) var requestCfgCallBackMap = hashMapOf<String, () -> Unit>()
private fun handleCfgCallBack() {
requestCfgIng.set(false)
LogEx.logDebug(TAG, "handleCfgCallBack")
val key1 = "adCallBack"
requestCfgCallBackMap.get(key1)?.let {
it.invoke()
requestCfgCallBackMap.remove(key1)
}
val key2 = "changeTimer"
requestCfgCallBackMap.get(key2)?.let {
it.invoke()
requestCfgCallBackMap.remove(key2)
}
} }
} }
...@@ -26,20 +26,22 @@ import com.base.appzxhy.SpConstObject.isGuided ...@@ -26,20 +26,22 @@ import com.base.appzxhy.SpConstObject.isGuided
import com.base.appzxhy.base.BaseActivity import com.base.appzxhy.base.BaseActivity
import com.base.appzxhy.base.jumpAction import com.base.appzxhy.base.jumpAction
import com.base.appzxhy.bean.FeatureBean.Companion.BATTERY_INFO import com.base.appzxhy.bean.FeatureBean.Companion.BATTERY_INFO
import com.base.appzxhy.bean.config.AdConfigBean
import com.base.appzxhy.business.ads.AdsMgr import com.base.appzxhy.business.ads.AdsMgr
import com.base.appzxhy.business.ads.AdsShowCallBack import com.base.appzxhy.business.ads.AdsShowCallBack
import com.base.appzxhy.business.helper.EventUtils import com.base.appzxhy.business.helper.EventUtils
import com.base.appzxhy.business.helper.NewComUtils import com.base.appzxhy.business.helper.NewComUtils
import com.base.appzxhy.business.helper.NewComUtils.requestCfgCallBack
import com.base.appzxhy.business.helper.NewComUtils.spConfig import com.base.appzxhy.business.helper.NewComUtils.spConfig
import com.base.appzxhy.business.service.StayJobService.Companion.startStayJobService import com.base.appzxhy.business.service.StayJobService.Companion.startStayJobService
import com.base.appzxhy.databinding.ActivitySplashBinding import com.base.appzxhy.databinding.ActivitySplashBinding
import com.base.appzxhy.ui.dialog.StoragePermissionDialog import com.base.appzxhy.ui.dialog.StoragePermissionDialog
import com.base.appzxhy.ui.guide.GuideCleanActivity import com.base.appzxhy.ui.guide.GuideCleanActivity
import com.base.appzxhy.ui.main.MainActivity import com.base.appzxhy.ui.main.MainActivity
import com.base.appzxhy.utils.LogEx
import com.base.appzxhy.utils.PermissionUtils.checkStorePermission import com.base.appzxhy.utils.PermissionUtils.checkStorePermission
import com.base.appzxhy.utils.PermissionUtils.requestStoragePermission import com.base.appzxhy.utils.PermissionUtils.requestStoragePermission
import com.base.appzxhy.utils.UmpUtils import com.base.appzxhy.utils.UmpUtils
import com.base.appzxhy.utils.umpCalled
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
...@@ -83,6 +85,13 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -83,6 +85,13 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
showLoadingAd() showLoadingAd()
setPrivacyPolicy() setPrivacyPolicy()
requestNotificationPermission() requestNotificationPermission()
viewModel.jumpNext = {
// Log.e(TAG, "Countdown jumpNext")
// jumpNext()
}
// viewModel.onTick = { s, t ->
// Log.e(TAG, "onTick $s $t")
// }
} }
private fun setPrivacyPolicy() { private fun setPrivacyPolicy() {
...@@ -139,17 +148,27 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -139,17 +148,27 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
} }
private fun initUMP() { private fun initUMP(callBack: () -> Unit) {
val ump = UmpUtils(this)
if (AdConfigBean.adsConfigBean.requestUmp && !umpCalled) {
umpCalled = true
val ump = UmpUtils(this)
if (ump.consentInformation.canRequestAds()) { if (ump.consentInformation.canRequestAds()) {
AdsMgr.init(this) callBack.invoke()
} else { } else {
ump.callback = { ump.callback = {
AdsMgr.init(this) callBack.invoke()
} }
LogEx.logDebug(TAG, "requestUMP")
ump.requestUMP() ump.requestUMP()
} }
} else {
callBack.invoke()
}
} }
private fun showLoadingAd() { private fun showLoadingAd() {
...@@ -160,6 +179,8 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -160,6 +179,8 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
if (ifAgreePrivacy) { if (ifAgreePrivacy) {
val acAction = { val acAction = {
initUMP {
LogEx.logDebug(TAG, "initUMP callBack")
AdsMgr.showOpen(this, showCallBack = object : AdsShowCallBack() { AdsMgr.showOpen(this, showCallBack = object : AdsShowCallBack() {
override fun show() { override fun show() {
viewModel.stopCountdown() viewModel.stopCountdown()
...@@ -171,13 +192,16 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -171,13 +192,16 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
}) })
} }
}
if (spConfig.isNotEmpty()) { if (spConfig.isNotEmpty()) {
Log.e(TAG, "1") Log.e(TAG, "1")
acAction.invoke() acAction.invoke()
} else { } else {
if (NewComUtils.requestCfgIng.get()) { if (NewComUtils.requestCfgIng.get()) {
requestCfgCallBack = { Log.e(TAG, "requestCfg")
NewComUtils.requestCfgCallBackMap.put("adCallBack") {
Log.e(TAG, "requestCfgCallBack")
lifecycleScope.launch(Dispatchers.Main) { lifecycleScope.launch(Dispatchers.Main) {
Log.e(TAG, "2") Log.e(TAG, "2")
acAction.invoke() acAction.invoke()
...@@ -251,7 +275,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -251,7 +275,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
} }
} }
override fun onNewIntent(intent: Intent?) { override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent) super.onNewIntent(intent)
handleIntentExtras() handleIntentExtras()
......
...@@ -30,8 +30,7 @@ class SplashViewModel : ViewModel() { ...@@ -30,8 +30,7 @@ class SplashViewModel : ViewModel() {
countdownJob = viewModelScope.launch(Dispatchers.IO) { countdownJob = viewModelScope.launch(Dispatchers.IO) {
while (isActive) { while (isActive) {
val currentTime = System.currentTimeMillis() val elapsed = System.currentTimeMillis() - startTime
val elapsed = currentTime - startTime
val remaining = totalTimeMs - elapsed val remaining = totalTimeMs - elapsed
if (remaining <= 0) { if (remaining <= 0) {
...@@ -49,6 +48,7 @@ class SplashViewModel : ViewModel() { ...@@ -49,6 +48,7 @@ class SplashViewModel : ViewModel() {
} }
launch(Dispatchers.Main) { launch(Dispatchers.Main) {
jumpNext?.invoke() jumpNext?.invoke()
jumpNext = null
} }
} }
} }
......
...@@ -41,7 +41,7 @@ class UmpUtils( ...@@ -41,7 +41,7 @@ class UmpUtils(
debugSettings.setDebugGeography(ConsentDebugSettings.DebugGeography.DEBUG_GEOGRAPHY_EEA) debugSettings.setDebugGeography(ConsentDebugSettings.DebugGeography.DEBUG_GEOGRAPHY_EEA)
//通过TEST-DEVICE-HASHED-ID log过滤ConsentDebugSettings 打印测试id,使用测试id来测试 //通过TEST-DEVICE-HASHED-ID log过滤ConsentDebugSettings 打印测试id,使用测试id来测试
// debugSettings.addTestDeviceHashedId("TEST-DEVICE-HASHED-ID") // debugSettings.addTestDeviceHashedId("TEST-DEVICE-HASHED-ID")
debugSettings.addTestDeviceHashedId("73FE7C2634104D50A11BE9B902AA0FA6") debugSettings.addTestDeviceHashedId("E136C135912795B2B1121AFD737A0F0E")
return debugSettings.build() return debugSettings.build()
} }
...@@ -114,19 +114,5 @@ class UmpUtils( ...@@ -114,19 +114,5 @@ class UmpUtils(
callback = null callback = null
} }
}) })
// UserMessagingPlatform.loadAndShowConsentFormIfRequired(activity) { loadAndShowError: FormError? ->
// LogEx.logDebug(
// TAG,
// "loadAndShowConsentFormIfRequired message=${loadAndShowError?.message} errorCode=${loadAndShowError?.errorCode}"
// )
// if (loadAndShowError != null) {
// callback?.invoke(false)
// callback = null
// } else {
// callback?.invoke(consentInformation.canRequestAds())
// callback = null
// }
// }
} }
} }
\ No newline at end of file
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