Commit f9fa5228 authored by jyx's avatar jyx

添加点Home键场景,优化体内广告展示问题

parent 29b3292c
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\jniLibs"/></dataSet></merger>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\shaders"/></dataSet></merger>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\assets"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\intermediates\shader_assets\debug\out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\assets"/></dataSet></merger>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\res"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\rs\debug"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\res"><file path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\res\values\attrs.xml" qualifiers=""><declare-styleable name="AnimatedSvgView">
<attr format="integer" name="animatedSvgImageSizeX"/>
<attr format="integer" name="animatedSvgImageSizeY"/>
<attr format="string" name="animatedSvgTraceTime"/>
<attr format="string" name="animatedSvgTraceTimePerGlyph"/>
<attr format="string" name="animatedSvgFillStart"/>
<attr format="string" name="animatedSvgFillTime"/>
<attr format="reference" name="animatedSvgGlyphStrings"/>
<attr format="reference" name="animatedSvgTraceColors"/>
<attr format="reference" name="animatedSvgTraceResidueColors"/>
<attr format="integer" name="animatedSvgTraceMarkerLength"/>
<attr format="reference" name="animatedSvgFillColors"/>
</declare-styleable></file></source><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\rs\debug"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\res"/></dataSet><mergedItems><configuration qualifiers=""><declare-styleable name="AnimatedSvgView">
<attr format="integer" name="animatedSvgImageSizeX"/>
<attr format="integer" name="animatedSvgImageSizeY"/>
<attr format="string" name="animatedSvgTraceTime"/>
<attr format="string" name="animatedSvgTraceTimePerGlyph"/>
<attr format="string" name="animatedSvgFillStart"/>
<attr format="string" name="animatedSvgFillTime"/>
<attr format="reference" name="animatedSvgGlyphStrings"/>
<attr format="reference" name="animatedSvgTraceColors"/>
<attr format="reference" name="animatedSvgTraceResidueColors"/>
<attr format="integer" name="animatedSvgTraceMarkerLength"/>
<attr format="reference" name="animatedSvgFillColors"/>
</declare-styleable></configuration></mergedItems></merger>
\ No newline at end of file
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.jaredrummler.android.animatedsvgview" >
4
5 <uses-sdk
6 android:minSdkVersion="14"
6-->D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
7 android:targetSdkVersion="28" />
7-->D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
8
9</manifest>
-- Merging decision tree log ---
manifest
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
package
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:11-61
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
xmlns:android
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
uses-sdk
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml reason: use-sdk injection requested
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
android:targetSdkVersion
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
android:minSdkVersion
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
......@@ -14,6 +14,7 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.multidex.MultiDex;
import com.KeepAliveConfig;
import com.mints.fiveworld.keepalive.HomePopManager;
import com.mints.fiveworld.keepalive.IActivityManagerHook;
import com.mints.fiveworld.manager.TDManager;
import com.mints.fiveworld.manager.UmengManager;
......@@ -246,6 +247,8 @@ public class MintsApplication extends BaseApp {
ForegroundOrBackground.resetAppOutCount();
WifiAdManager.Companion.getInstance().resetAdLoadOk();
AppOutWifiAdManager.Companion.getInstance().resetAdLoadOk();
HomePopManager.getInstance().startUserHomePop();
}
});
......
......@@ -195,6 +195,19 @@ object AdReportManager {
EVENT_TYPE_SCENCE_IN_FIVE_ENTER("609"), // 体内 -同5逻辑 进入逻辑校验
EVENT_TYPE_SCENCE_IN_FIVE_ENTER_HIT("610"), // 体内 -同5逻辑 命中 - 不展示广告
EVENT_TYPE_SCENCE_IN_FIVE_ENTER_NO_HIT("611"), // 体内 -同5逻辑 未命中 - 不展示广告
/**
* home-click定时
*/
EVENT_TYPE_HOME_CLICK_START("300"), // 300 HOME-CLICK 触发
EVENT_TYPE_HOME_CLICK_COUNT("301"), // 301 HOME-CLICK-3 次数达标
EVENT_TYPE_HOME_CLICK_LOCK("302"), // 302 HOME-CLICK-1 是否应用在锁屏
EVENT_TYPE_HOME_CLICK_LOADING_AD("303"), // 303 HOME-CLICK -10 是否有体外透明页正在加载广告
EVENT_TYPE_HOME_CLICK_FULL_VIDEO_FOREGROUND("304"), // 304 HOME-CLICK -9 是否全屏广告在前台
EVENT_TYPE_HOME_CLICK_TIME10_FOREGROUND("305"), // 305 HOME-CLICK -7 是否定时在前台
EVENT_TYPE_HOME_CLICK_SCENE_FOREGROUND("306"), // 306 HOME-CLICK -8 是否场景在前台
EVENT_TYPE_HOME_CLICK_HORIZONTALSCREEN("307"), // 307 HOME-CLICK -5 是否横屏
EVENT_TYPE_HOME_CLICK_CALL("308"),
}
enum class AdActivityType(val value: String) {
......
......@@ -248,7 +248,7 @@ public class OutTimeInterstitial {
vo.put("adSource", adSource);
vo.put("adType", Constant.GRO_MORE_ADTYPE3);
vo.put("adid", interstitialId);
vo.put("inner",AdReportManager.INNER_OUT);
vo.put("inner", AdReportManager.INNER_OUT);
TrackManager.getInstance().cmtGroMoreInfo(vo);
AdReportManager.INSTANCE.eventInscreen(AdReportManager.INNER_OUT, Constant.AD_SOURCE_GROMORE,
......
......@@ -13,6 +13,7 @@ import com.mints.fiveworld.mvp.model.WeightBean
import com.mints.fiveworld.ui.activitys.keepalive.BoostFastActivity
import com.mints.fiveworld.ui.activitys.keepalive.TempTransparentActivity
import com.mints.fiveworld.ui.activitys.keepalive.TransSceneActivity
import com.mints.fiveworld.ui.activitys.keepalive.TransparentActivity
import com.mints.fiveworld.utils.ForegroundOrBackground
import com.mints.fiveworld.utils.TimeRender
import com.mints.fiveworld.utils.IntentUtils
......@@ -37,6 +38,7 @@ class AppOutWifiAdManager private constructor() {
private var weightList: ArrayList<WeightBean>? = null
private var mType = 0
private var mTransparentType: String? = null
@Volatile
private var isAdLoadOk = true
......@@ -57,6 +59,7 @@ class AppOutWifiAdManager private constructor() {
// 应用外定时动画 载体优化
val bundle = Bundle()
bundle.putInt(TransSceneActivity.TIMING_TYPE, mType)
bundle.putString(TransparentActivity.TRANSPARENT_TYPE, mTransparentType)
IntentUtils.startActivity3(
Constant.CARRIER_OUT_TEN_TIME,
bundle,
......@@ -69,8 +72,13 @@ class AppOutWifiAdManager private constructor() {
/**
* 预加载广告,必须传入activity
*/
fun loadWifiAd(activity: Activity, type: Int) {
fun loadWifiAd(
activity: Activity,
type: Int,
transparentType: String? = TransparentActivity.TRANSPARENT_TYPE_TIMER
) {
mType = type
mTransparentType = transparentType
currentAdType = getRandomWeightType()
isAdLoadOk = false
......
......@@ -47,6 +47,7 @@ object Constant {
// 载体
/*******************************************************/
const val CARRIER_OUT_HOME_CLICK = "OUT_HOME_CLICK" // 应用外HOME页点击
const val CARRIER_OUT_TEN_TIME = "OUT_TEN_TIME" // 应用外定时10分钟广告
const val CARRIER_OUT_TRANSPARENT_ACTIVITY = "OUT_TRANSPARENT_ACTIVITY" // 应用外透明界面
const val CARRIER_SAFE_CHECK = "SAFE_CHECK" // 安全检测
......
......@@ -3,6 +3,7 @@ package com.mints.fiveworld.manager.wifi
import com.mints.fiveworld.ad.AdReportManager
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.keepalive.AlarmManager
import com.mints.fiveworld.keepalive.HomePopManager
import com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
import com.mints.fiveworld.manager.AppPreferencesManager
import com.mints.fiveworld.manager.TrackManager
......@@ -80,6 +81,10 @@ object WifiDataManager {
const val LOW_STORAGE = "LOW_STORAGE"
private const val LOW_STORAGE_SWITCH = "LOW_STORAGE_SWITCH"
// home页点击
const val HOME_CLICK = "HOME_CLICK"
private const val HOME_CLICK_SWITCH = "HOME_CLICK_SWITCH"
// 服务器下发本地定时间隔
private const val LOCAL_HOME_TIME_INTERVAL = "LOCAL_HOME_TIME_INTERVAL"
......@@ -152,6 +157,9 @@ object WifiDataManager {
// 存储空间不足 次数及开关
var LOW_STORAGE_TIMES = 1
// home页点击 次数及开关
var HOME_CLICK_TIMES = 20
// 服务器下发应用外自动进入场景次数, 0时为关闭
private const val SERVER_OUT_AUTOENTER_TIMES = "SERVER_OUT_AUTOENTER_TIMES"
......@@ -174,12 +182,104 @@ object WifiDataManager {
// 服务器下发本地Home页展示插屏百分比,总值为100
private const val LOCAL_HOME_INSCREEN_PERCENTAGE = "LOCAL_HOME_INSCREEN_PERCENTAGE"
// 服务器下发本地HOME_CLICK时间间隔
private const val LOCAL_SCENE_HOME_CLICK_INTERVAL = "LOCAL_SCENE_HOME_CLICK_INTERVAL"
// 服务器下发本地HOME_CLICK多少秒之后弹
private const val LOCAL_SCENE_HOME_CLICK_TIME = "LOCAL_SCENE_HOME_CLICK_TIME"
// 服务器下发本地动画时间隔
private const val LOCAL_ANIM_INTERVAL = "LOCAL_ANIM_INTERVAL"
// 服务器下发本地Home页展示插屏百分比,总值为100
// private const val LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE =
// "LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE"
private val sp by lazy { AppPreferencesManager.get() }
/**
* Home页点击
*/
fun getHomeClick(): Boolean {
LogUtil.d(
TAG,
"homeclick -> 是否命中黑名单=${isBlackOrClose()} 当前场景开关=${
sp.getBoolean(
HOME_CLICK_SWITCH,
true
)
} homeclick -> 次数=${sp.getInt(HOME_CLICK, 0)} 阈值=" + HOME_CLICK_TIMES
)
if (isBlackOrClose()) {
AdReportManager.eventScene(
AdReportManager.INNER_OUT,
System.currentTimeMillis(),
Constant.CARRIER_OUT_TEN_TIME,
"homeclick -> 是否命中黑名单=${AntiAuditManager.instance.isBlack()}" +
" 总开关=${
sp.getBoolean(
APP_OUT_SWITCH,
true
)
}" +
" 当前场景开关=${sp.getBoolean(HOME_CLICK_SWITCH, true)}" +
" homeclick -> 当天已弹出次数=${sp.getInt(HOME_CLICK, 0)}" +
"阈值=" + HOME_CLICK_TIMES,
AdReportManager.EVENT_TYPE_SCENCE_CLOSE,
AdReportManager.ERROR_CODE_OPEN,
"总开关/场景开关"
)
return false
}
// 总开关关闭 return
if (!sp.getBoolean(HOME_CLICK_SWITCH, true)) {
// 场景开关关闭
UmengManager.onEvent(AdReportManager.EventType.EVENT_TYPE_SCENCE_SWITCH_CLOSE.name)
AdReportManager.eventScene(
AdReportManager.INNER_OUT,
System.currentTimeMillis(),
Constant.CARRIER_OUT_TEN_TIME,
"homeclick -> 是否命中黑名单=${AntiAuditManager.instance.isBlack()}" +
" 总开关=${
sp.getBoolean(
APP_OUT_SWITCH,
true
)
}" +
" 当前场景开关=${sp.getBoolean(HOME_CLICK_SWITCH, true)}" +
" homeclick -> 当天已弹出次数=${sp.getInt(HOME_CLICK, 0)}" +
" homeclick阈值=" + HOME_CLICK_TIMES,
AdReportManager.EVENT_TYPE_SCENCE_CLOSE,
AdReportManager.ERROR_CODE_OPEN,
"总开关/场景开关"
)
return false
}
val homeclick = sp.getInt(HOME_CLICK, 0)
// 次数超过限制 return
if (homeclick >= HOME_CLICK_TIMES) {
AdReportManager.eventScene(
AdReportManager.INNER_OUT,
System.currentTimeMillis(),
Constant.CARRIER_OUT_TEN_TIME,
"homeclick -> 当天已弹出次数=${sp.getInt(HOME_CLICK, 0)} homeclick阈值=" + HOME_CLICK_TIMES,
AdReportManager.EVENT_TYPE_SCENCE_CLOSE,
AdReportManager.ERROR_CODE_COUNT,
"超过次数"
)
UmengManager.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_COUNT.name)
return false
}
return true
}
/**
* 是否显示挂断电话广告
*/
......@@ -1487,25 +1587,11 @@ object WifiDataManager {
/**
* 是否当天
*/
fun getNewDay(time: Long, setAllToZero: Boolean, data: OutAppConfig? = null): Boolean {
fun getNewDay(setAllToZero: Boolean): Boolean {
if (!setAllToZero) return false
// var preTime = sp.getLong(NEW_DAY_FLAG, 0L)
// if (time == 0L || preTime == 0L) {
// preTime = System.currentTimeMillis()
// sp.put(NEW_DAY_FLAG, time)
// }
// 上一次服务器的时间,首次为系统时间
// 判断时间是否是新的一天
// if (DateUtils.isToday(preTime)) {
// // 不是新的一天
// return true
// }
TrackManager.getInstance().getOuterAdConfig()
resetDayCount()
// 第二天,新的一天
// sp.put(NEW_DAY_FLAG, time)
return true
}
......@@ -1523,6 +1609,7 @@ object WifiDataManager {
"UPDATE_APK:${sp.getInt(UPDATE_APK, 0)} " +
"UNINSTALL_APK:${sp.getInt(UNINSTALL_APK, 0)} " +
"TIMING:${sp.getInt(TIMING, 0)} " +
"HOME_CLICK:${sp.getInt(HOME_CLICK, 0)} " +
"LOW_STORAGE:${sp.getInt(LOW_STORAGE, 0)} " +
"LOW_POWER:${sp.getInt(LOW_POWER, 0)} " +
"COOL:${sp.getInt(COOL, 0)} " +
......@@ -1545,11 +1632,12 @@ object WifiDataManager {
sp.put(UPDATE_APK, 0)
sp.put(UNINSTALL_APK, 0)
sp.put(TIMING, 0)
sp.put(HOME_CLICK, 0)
sp.put(LOW_STORAGE, 0)
sp.put(LOW_POWER, 0)
sp.put(COOL, 0)
sp.put(WEAK_SIGNAL, 0)
// sp.put(Constant.IS_ONE_OUT_ACTIVE, false)
setLocalOutAutoenterTimes(0)
setHomeInscreenTimes(0)
......@@ -1563,6 +1651,7 @@ object WifiDataManager {
"UPDATE_APK:${sp.getInt(UPDATE_APK, 0)} " +
"UNINSTALL_APK:${sp.getInt(UNINSTALL_APK, 0)} " +
"TIMING:${sp.getInt(TIMING, 0)} " +
"HOME_CLICK:${sp.getInt(HOME_CLICK, 0)} " +
"LOW_STORAGE:${sp.getInt(LOW_STORAGE, 0)} " +
"LOW_POWER:${sp.getInt(LOW_POWER, 0)} " +
"COOL:${sp.getInt(COOL, 0)} " +
......@@ -1692,6 +1781,19 @@ object WifiDataManager {
sp.put(TIMING_SWITCH, false)
}
// home页点击
if (data.modules.homeClick.isOpen) {
sp.put(HOME_CLICK_SWITCH, true)
HOME_CLICK_TIMES = data.modules.homeClick.maxCount
HomePopManager.getInstance()
.setAppOutHomeClickSecond(data.modules.homeClick.workTime)
HomePopManager.getInstance()
.setAppOutHomeClickInterval(data.modules.homeClick.intervalMins)
} else {
sp.put(HOME_CLICK_SWITCH, false)
}
// 低电量,电量不足40%
if (data.modules.electricQuantity.isOpen) {
sp.put(LOW_POWER_SWITCH, true)
......@@ -1826,6 +1928,9 @@ object WifiDataManager {
TIMING -> {
sp.put(TIMING, sp.getInt(TIMING, 0) + 1)
}
HOME_CLICK -> {
sp.put(HOME_CLICK, sp.getInt(HOME_CLICK, 0) + 1)
}
LOW_STORAGE -> {
sp.put(LOW_STORAGE, sp.getInt(LOW_STORAGE, 0) + 1)
}
......@@ -1985,6 +2090,48 @@ object WifiDataManager {
*/
fun getHomeTimeInterval() = sp.getInt(LOCAL_HOME_TIME_INTERVAL, 10)
/**
* 设置本地按HOME_CLICK多少秒之后弹出
*/
fun setSceneHomeClickTime(value: Int) {
sp.put(LOCAL_SCENE_HOME_CLICK_INTERVAL, value)
}
/**
* 获取本地按HOME_CLICK多少秒之后弹出
*/
fun getSceneHomeClickTime() = sp.getInt(LOCAL_SCENE_HOME_CLICK_TIME, 9)
/**
* 设置本地按HOME_CLICK展示时间间隔
*/
fun setSceneHomeClickInterval(value: Int) {
sp.put(LOCAL_SCENE_HOME_CLICK_INTERVAL, value)
}
/**
* 获取本地按HOME_CLICK展示时间间隔
*/
fun getSceneHomeClickInterval(): Int {
val interval = sp.getInt(LOCAL_SCENE_HOME_CLICK_INTERVAL, 10)
return if (interval == 0) 1 else interval
}
/**
* 设置本地动画时间时间间隔
*/
fun setAnimInterval(value: Int) {
sp.put(LOCAL_ANIM_INTERVAL, value)
}
/**
* 获取本地按动画时间时间间隔
*/
fun getAnimInterval(): Int {
val interval = sp.getInt(LOCAL_ANIM_INTERVAL, 1)
return if (interval == 0) 1 else interval
}
// 上次W测分分值
const val LAST_SCORE = "LAST_SCORE"
......
......@@ -123,6 +123,16 @@ public class OutAppConfig implements Serializable {
* open : true
*/
private HomeClickDTO homeClick;
public HomeClickDTO getHomeClick() {
return homeClick;
}
public void setHomeClick(HomeClickDTO homeClick) {
this.homeClick = homeClick;
}
private AppUninstallDTO app_uninstall;
/**
* remark : wifi连接
......@@ -476,6 +486,56 @@ public class OutAppConfig implements Serializable {
}
}
public static class HomeClickDTO {
private String remark;
private int intervalMins;
public int getWorkTime() {
return workTime;
}
public void setWorkTime(int workTime) {
this.workTime = workTime;
}
private int workTime;
private int maxCount;
private boolean open;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public int getIntervalMins() {
return intervalMins;
}
public void setIntervalMins(int intervalMins) {
this.intervalMins = intervalMins;
}
public int getMaxCount() {
return maxCount;
}
public void setMaxCount(int maxCount) {
this.maxCount = maxCount;
}
public boolean isOpen() {
return open;
}
public void setOpen(boolean open) {
this.open = open;
}
}
public static class AppUninstallDTO {
private String remark;
private int maxCount;
......
......@@ -32,6 +32,18 @@ public class UserTaskMsgBean implements Serializable {
return signPageStatus;
}
public int getAnimationSecondsInTiming() {
return animationSecondsInTiming;
}
public void setAnimationSecondsInTiming(int animationSecondsInTiming) {
this.animationSecondsInTiming = animationSecondsInTiming;
}
private int animationSecondsInTiming;//定时动画时间间隔
private int signPageStatus;
private int ouerAdAutoInnerSceneRate;//应用外自动弹出百分比
private int ouerAdAutoInnerSceneMax;//应用外自动弹出最大值
......
......@@ -13,5 +13,6 @@ data class WifiActiveBean(
val outerConfigs: OutAppConfig? = null,
val fullScreenShowflagRate: Int = 50,
val setAllToZero: Boolean = false,
val gromoreAppid: String = ""
val gromoreAppid: String = "",
val animationSecondsInTiming: Int = 1
) : Serializable
\ No newline at end of file
......@@ -171,10 +171,10 @@ public class TrackPresenter extends BaseTrackPresenter {
if (data.getOuterConfigs() != null) {
// 本地标记未赋值时
WifiDataManager.INSTANCE.getNewDay(data.getTime(), data.getSetAllToZero(), null);
WifiDataManager.INSTANCE.getNewDay(data.getSetAllToZero());
WifiDataManager.INSTANCE.resetServerSumCountData(data.getOuterConfigs());
// 设置本地拉黑标记 由云端控制
AntiAuditManager.Companion.getInstance().resetBlack(data.getOuterConfigs().isInnerAdOpen(),data.getOuterConfigs().isOpen(), Constant.CARRIER_OUT_TEN_TIME);
AntiAuditManager.Companion.getInstance().resetBlack(data.getOuterConfigs().isInnerAdOpen(), data.getOuterConfigs().isOpen(), Constant.CARRIER_OUT_TEN_TIME);
}
// 设置场景上报接口开头
......@@ -187,6 +187,7 @@ public class TrackPresenter extends BaseTrackPresenter {
WifiDataManager.INSTANCE.setServerOutAutoenterPercentage(data.getOuerAdAutoInnerSceneRate());
WifiDataManager.INSTANCE.setServerOutAutoenterSecond(data.getOuerAdAutoInnerSceneSeconds());
WifiDataManager.INSTANCE.setServerOutAutoenterTimes(data.getOuerAdAutoInnerSceneMax());
WifiDataManager.INSTANCE.setAnimInterval(data.getAnimationSecondsInTiming());
}
}
} catch (Exception e) {
......@@ -303,7 +304,7 @@ public class TrackPresenter extends BaseTrackPresenter {
@Override
public void onNext(BaseResponse<JsonObject> baseResponse) {
// 启动页直接返回
if(TextUtils.equals(type,Constant.SPLASH_10_MATE)){
if (TextUtils.equals(type, Constant.SPLASH_10_MATE)) {
return;
}
......
......@@ -291,7 +291,10 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
initView()
cleanData()
resetTime()
if (Utils.canLoadAd()) {
initExpress()
}
startAnim()
}
......
......@@ -172,7 +172,8 @@ class MainActivity : BaseActivity(), MainView {
WifiDataManager.setServerOutAutoenterTimes(data.ouerAdAutoInnerSceneMax)
WifiDataManager.setHomeInscreenAllTimes(data.insertScreenMax)
WifiDataManager.setHomeInscreenPercentage(data.insertScreenRate)
WifiDataManager.getNewDay(0L, data.isSetAllToZero)
WifiDataManager.getNewDay(data.isSetAllToZero)
WifiDataManager.setAnimInterval(data.animationSecondsInTiming)
CsjGroMoreManager.updataAppId(data.gromoreAppid, data.gromoreAdcodes)
}
......
......@@ -182,7 +182,11 @@ class SafeTestingActivity : BaseActivity(), View.OnClickListener {
containerAnim.visibility = View.GONE
container.visibility = View.VISIBLE
headerContainer.visibility = View.VISIBLE
if (Utils.canLoadAd()) {
initExpress()
}
if (mIncreaseType == INCREASE2_SAFE_CHECK) {
ivGif2.visibility = View.VISIBLE
tvInfo2.visibility = View.VISIBLE
......
......@@ -134,8 +134,12 @@ class SignalStrengthActivity : BaseActivity(), View.OnClickListener {
mTimer?.cancel()
return@runOnUiThread
} else if (mStep == 2) {
if (Utils.canLoadAd()) {
initExpress()
}
}
tv_progress.text = speedStr[mStep - 1]
}
}
......
......@@ -13,9 +13,11 @@ import com.mints.fiveworld.ad.express.ExpressAdCallback
import com.mints.fiveworld.ad.wifi.AppOutWifiAdManager
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.keepalive.AlarmManager
import com.mints.fiveworld.keepalive.HomePopManager
import com.mints.fiveworld.manager.UmengManager
import com.mints.fiveworld.manager.wifi.WifiDataManager
import com.mints.fiveworld.ui.widgets.RoundRectLayout
import com.mints.fiveworld.utils.LogUtil
import com.mints.fiveworld.utils.StatusBarUtil
import com.mints.fiveworld.utils.Utils
import kotlinx.android.synthetic.main.activity_boost_fast.*
......@@ -31,6 +33,8 @@ class BoostFastActivity : BaseOutActivity(), AlarmManager.AlarmManagerManagedAct
private var mType = 0
private var mTransparentType = TransparentActivity.TRANSPARENT_TYPE_TIMER
private var frameLayout: FrameLayout? = null
override fun onCreate(savedInstanceState: Bundle?) {
......@@ -41,11 +45,24 @@ class BoostFastActivity : BaseOutActivity(), AlarmManager.AlarmManagerManagedAct
StatusBarUtil.transparencyBar(this)
intent.extras?.let {
mType = it.getInt(TransparentActivity.TIMING_TYPE, 0)
mTransparentType = it.getString(
TransparentActivity.TRANSPARENT_TYPE,
TransparentActivity.TRANSPARENT_TYPE_TIMER
)
}
if (mTransparentType == TransparentActivity.TRANSPARENT_TYPE_TIMER) {
WifiDataManager.increaseCount(WifiDataManager.TIMING)
} else {
HomePopManager.getInstance().writePopTime(System.currentTimeMillis())
WifiDataManager.increaseCount(WifiDataManager.HOME_CLICK)
}
LogUtil.d("当前弹出类型 ->>>>> $mTransparentType")
initView()
startAnim()
......@@ -70,7 +87,7 @@ class BoostFastActivity : BaseOutActivity(), AlarmManager.AlarmManagerManagedAct
AppOutWifiAdManager.instance.tempShowAd(this)
},
2500
(WifiDataManager.getAnimInterval() * 1000 + 1500).toLong()
)
Handler(Looper.getMainLooper()).postDelayed({ updateUi() }, 3000)
......@@ -82,19 +99,30 @@ class BoostFastActivity : BaseOutActivity(), AlarmManager.AlarmManagerManagedAct
// container.visibility = View.GONE
adContainer.visibility = View.VISIBLE
var contentStr = StringBuilder()
when (mType) {
TransparentActivity.TIMING_TYPE_BOOST -> tvContent.text = "手机速度已达最佳"
TransparentActivity.TIMING_TYPE_BOOST -> contentStr.append("手机速度已达最佳")
TransparentActivity.TIMING_TYPE_CLEAN -> {
tvContent.text = "已为您清理" + (10 + Random.nextInt(20)) + "MB垃圾" + "\n垃圾清理已完成"
contentStr.append("已为您清理" + (10 + Random.nextInt(20)) + "MB垃圾" + "\n垃圾清理已完成")
}
TransparentActivity.TIMING_TYPE_SAVE_ELE -> {
tvContent.text = "已为您延长待机时间" + (10 + Random.nextInt(20)) + "分钟~"
contentStr.append("已为您延长待机时间" + (10 + Random.nextInt(20)) + "分钟")
}
TransparentActivity.TIMING_TYPE_COOL -> {
tvContent.text = "手机已降温" + (2 + Random.nextInt(3)) + "°C"
contentStr.append("手机已降温" + (2 + Random.nextInt(3)) + "°C")
}
TransparentActivity.TIMING_TYPE_SAFE -> tvContent.text = "当前网络环境良好"
TransparentActivity.TIMING_TYPE_PRICARY -> tvContent.text = "当前使用环境安全"
TransparentActivity.TIMING_TYPE_SAFE -> contentStr.append("当前网络环境良好")
TransparentActivity.TIMING_TYPE_PRICARY -> contentStr.append("当前使用环境安全")
}
if (mTransparentType == TransparentActivity.TRANSPARENT_TYPE_TIMER) {
tvContent.text = contentStr
} else {
contentStr.append("~")
tvContent.text = contentStr
}
UmengManager.onEvent(AdReportManager.EventType.EVENT_TYPE_SCENCE_OUT_ACTIVITY_SHOW_SUC.name)
......
......@@ -22,6 +22,8 @@ class TransparentActivity : Activity(), OutManagedActivity {
const val TRANSPARENT_TYPE = "TRANSPARENT_TYPE"
const val TRANSPARENT_TYPE_TIMER = "TRANSPARENT_TYPE_TIMER"
const val TRANSPARENT_TYPE_HOME_CLICK = "TRANSPARENT_TYPE_HOME_CLICK"
const val TRANSPARENT_TYPE_TRIGGER = "TRANSPARENT_TYPE_TRIGGER"
const val TRANSPARENT_TYPE_APK = "TRANSPARENT_TYPE_APK"
......@@ -88,7 +90,7 @@ class TransparentActivity : Activity(), OutManagedActivity {
UmengManager.onEvent(AdReportManager.EventType.EVENT_TYPE_SCENCE_OUT_TRANSPARENT_SHOW_SUC.name)
AppOutWifiAdManager.instance.loadWifiAd(this, mType)
AppOutWifiAdManager.instance.loadWifiAd(this, mType, mTransparentType)
// 预加载信息流
OutSimpleExpress.instance.loadADFrameLayout(
......
This diff is collapsed.
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