Commit 3a49fb8e authored by wanglei's avatar wanglei

...

parent 8ee783bd
......@@ -2,7 +2,6 @@ package com.base.locationsharewhite
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.base.locationsharewhite.fcm.PopupConstObject.createDefaultJson
import org.junit.Test
import org.junit.runner.RunWith
......
package com.base.locationsharewhite.ads
import com.base.locationsharewhite.utils.AppPreferences
import org.json.JSONObject
/**
* 广告限制配置
......@@ -32,5 +33,15 @@ data class AdsConfigBean(
}
return adsConfigBean
}
fun createDefaultAdJson(): JSONObject {
val json = JSONObject()
json.put("numDisplayLimit", "-1")
json.put("numRequestLimit", "-1")
json.put("numClickLimit", "-1")
json.put("timeInterval", "1")
json.put("openAdLoading", "15")
return json
}
}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ object PopupConstObject {
const val POPUP_WHERE_HOVER_HANDLE = "hover_handle"//悬停调用
//推送总开关 0 关 1开
val popup_status = "popup_status"
const val popup_status = "popup_status"
//推送总数量现在
const val popup_count = "popup_count"//所有常规推送的当日推送次数限制,0 为不限制
......@@ -59,7 +59,7 @@ object PopupConstObject {
const val ACTION_ENABLE_LOCATION = "action_enable_location"
const val ACTION_COPY_CODE = "action_copy_code"
fun createDefaultJson() {
fun createDefaultPopupJson() {
val json = JSONObject()
//通知总的条件
......
......@@ -9,7 +9,7 @@ import com.base.locationsharewhite.ads.AdsConfigBean
import com.base.locationsharewhite.ads.AdsMgr
import com.base.locationsharewhite.fcm.BatteryStatusReceiver
import com.base.locationsharewhite.fcm.PackageStatusReceiver
import com.base.locationsharewhite.fcm.PopupConstObject.createDefaultJson
import com.base.locationsharewhite.fcm.PopupConstObject.createDefaultPopupJson
import com.base.locationsharewhite.fcm.ScreenStatusReceiver
import com.base.locationsharewhite.fcm.alarm.AlarmUtils.startAlarm
import com.base.locationsharewhite.helper.config.AppConfig
......@@ -79,7 +79,7 @@ class MyApplication : Application() {
startAlarm(appContext)
createDefaultJson()
createDefaultPopupJson()
}
......
package com.base.locationsharewhite
import com.base.locationsharewhite.fcm.PopupConstObject.createDefaultJson
import org.junit.Test
import org.junit.Assert.*
......
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