Commit 769d25a1 authored by wanglei's avatar wanglei

...

parent 3a49fb8e
...@@ -25,11 +25,11 @@ data class AdsConfigBean( ...@@ -25,11 +25,11 @@ data class AdsConfigBean(
val adsConfigBean = AdsConfigBean() val adsConfigBean = AdsConfigBean()
adsConfigBean.apply { adsConfigBean.apply {
isInBlackList = AppPreferences.getInstance().getBoolean("isInBlackList", false) isInBlackList = AppPreferences.getInstance().getBoolean("isInBlackList", false)
numDisplayLimit = AppPreferences.getInstance().getInt("numDisplayLimit", -1) numDisplayLimit = AppPreferences.getInstance().getString("numDisplayLimit", "-1").toInt()
numRequestLimit = AppPreferences.getInstance().getInt("numRequestLimit", -1) numRequestLimit = AppPreferences.getInstance().getString("numRequestLimit", "-1").toInt()
numClickLimit = AppPreferences.getInstance().getInt("numClickLimit", -1) numClickLimit = AppPreferences.getInstance().getString("numClickLimit", "-1").toInt()
timeInterval = AppPreferences.getInstance().getInt("timeInterval", 1) timeInterval = AppPreferences.getInstance().getString("timeInterval", "1").toInt()
openAdLoading = AppPreferences.getInstance().getInt("openAdLoading", 15) openAdLoading = AppPreferences.getInstance().getString("openAdLoading", "15").toInt()
} }
return adsConfigBean return adsConfigBean
} }
......
...@@ -12,13 +12,13 @@ import com.base.locationsharewhite.utils.KotlinExt.toFormatTime4 ...@@ -12,13 +12,13 @@ import com.base.locationsharewhite.utils.KotlinExt.toFormatTime4
* *
*/ */
object LimitUtils { object LimitUtils {
const val NUM_DISPLAY = "numDisplayLimit" const val NUM_DISPLAY = "local_numDisplayLimit"
const val NUM_REQUEST = "numRequestLimit" const val NUM_REQUEST = "local_numRequestLimit"
const val NUM_CLICK = "numClickLimit" const val NUM_CLICK = "local_numClickLimit"
const val SAVE_DATE = "SAVE_DATE" const val SAVE_DATE = "local_SAVE_DATE"
/** /**
* 保存的时间,用来判断是否是当天,不是当天要重置计数次数 * 保存的时间,用来判断是否是当天,不是当天要重置计数次数
......
package com.base.locationsharewhite.fcm package com.base.locationsharewhite.fcm
import com.base.locationsharewhite.utils.LogEx
import org.json.JSONObject import org.json.JSONObject
object PopupConstObject { object PopupConstObject {
...@@ -59,7 +58,7 @@ object PopupConstObject { ...@@ -59,7 +58,7 @@ object PopupConstObject {
const val ACTION_ENABLE_LOCATION = "action_enable_location" const val ACTION_ENABLE_LOCATION = "action_enable_location"
const val ACTION_COPY_CODE = "action_copy_code" const val ACTION_COPY_CODE = "action_copy_code"
fun createDefaultPopupJson() { fun createDefaultPopupJson(): JSONObject {
val json = JSONObject() val json = JSONObject()
//通知总的条件 //通知总的条件
...@@ -88,6 +87,6 @@ object PopupConstObject { ...@@ -88,6 +87,6 @@ object PopupConstObject {
json.put(popup_screen_count, "20") json.put(popup_screen_count, "20")
json.put(popup_screen_interval, "1") json.put(popup_screen_interval, "1")
LogEx.logDebug("createDefaultJson", "json=$json") return json
} }
} }
\ No newline at end of file
package com.base.locationsharewhite.helper package com.base.locationsharewhite.helper
import FCMManager
import android.app.Activity import android.app.Activity
import android.app.Application import android.app.Application
import android.content.Intent import android.content.Intent
...@@ -9,7 +10,6 @@ import com.base.locationsharewhite.ads.AdsConfigBean ...@@ -9,7 +10,6 @@ import com.base.locationsharewhite.ads.AdsConfigBean
import com.base.locationsharewhite.ads.AdsMgr import com.base.locationsharewhite.ads.AdsMgr
import com.base.locationsharewhite.fcm.BatteryStatusReceiver import com.base.locationsharewhite.fcm.BatteryStatusReceiver
import com.base.locationsharewhite.fcm.PackageStatusReceiver import com.base.locationsharewhite.fcm.PackageStatusReceiver
import com.base.locationsharewhite.fcm.PopupConstObject.createDefaultPopupJson
import com.base.locationsharewhite.fcm.ScreenStatusReceiver import com.base.locationsharewhite.fcm.ScreenStatusReceiver
import com.base.locationsharewhite.fcm.alarm.AlarmUtils.startAlarm import com.base.locationsharewhite.fcm.alarm.AlarmUtils.startAlarm
import com.base.locationsharewhite.helper.config.AppConfig import com.base.locationsharewhite.helper.config.AppConfig
...@@ -79,7 +79,11 @@ class MyApplication : Application() { ...@@ -79,7 +79,11 @@ class MyApplication : Application() {
startAlarm(appContext) startAlarm(appContext)
createDefaultPopupJson() // val popupJson = createDefaultPopupJson()
// val adJson = createDefaultAdJson()
// val allJons = adJson.pullAll(popupJson)
// LogEx.logDebug(TAG, "allJons=$allJons")
} }
......
package com.base.locationsharewhite.utils
import org.json.JSONObject
object JsonUtils {
fun JSONObject.pullAll(jsonObject: JSONObject): JSONObject {
for (key in jsonObject.keys()) {
this.put(key, jsonObject.get(key))
}
return this
}
}
\ 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