Commit 3833952b authored by leichao.gao's avatar leichao.gao

ad config

parent 4d3d1fa2
package com.base.datarecovery.utils package com.base.datarecovery.utils
import android.util.Log import android.util.Log
import com.base.datarecovery.ads.AdDisplayUtils
import com.base.datarecovery.bean.ConfigBean import com.base.datarecovery.bean.ConfigBean
import com.base.datarecovery.help.ConfigHelper import com.base.datarecovery.help.ConfigHelper
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.* import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.io.BufferedReader 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.* import java.util.Locale
object NewComUtils { object NewComUtils {
private const val API_URL = ConfigHelper.apiUrl private const val API_URL = ConfigHelper.apiUrl
...@@ -88,6 +92,11 @@ object NewComUtils { ...@@ -88,6 +92,11 @@ object NewComUtils {
Log.d("okhttp:","t: "+t +" u: "+u) Log.d("okhttp:","t: "+t +" u: "+u)
} }
AdDisplayUtils.getInstance().setMaxAdDisplayCount(
AppPreferences.getInstance().getString("adShowCount", "45").toInt()
)
AdDisplayUtils.getInstance().maxAdClickCount =
AppPreferences.getInstance().getString("adClickCount", "10").toInt()
} }
} }
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