Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_fiveworld
Commits
75accb5f
Commit
75accb5f
authored
Dec 13, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加打点
parent
b9b31c7b
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1030 additions
and
242 deletions
+1030
-242
merge-state
...termediates/incremental/debug-mergeNativeLibs/merge-state
+0
-0
AdReportManager.kt
app/src/main/java/com/mints/fiveworld/ad/AdReportManager.kt
+182
-147
OkHttpInterceptor.java
.../main/java/com/mints/fiveworld/net/OkHttpInterceptor.java
+2
-0
BoostFast2Activity.kt
...ts/fiveworld/ui/activitys/keepalive/BoostFast2Activity.kt
+257
-0
BoostFastActivity.kt
...nts/fiveworld/ui/activitys/keepalive/BoostFastActivity.kt
+150
-80
BoostHomeActivity.kt
...nts/fiveworld/ui/activitys/keepalive/BoostHomeActivity.kt
+263
-0
activity_boost2_fast.xml
app/src/main/res/layout/activity_boost2_fast.xml
+85
-0
activity_boost_fast.xml
app/src/main/res/layout/activity_boost_fast.xml
+6
-15
activity_boost_home.xml
app/src/main/res/layout/activity_boost_home.xml
+85
-0
No files found.
animlibrary/build/intermediates/incremental/debug-mergeNativeLibs/merge-state
deleted
100644 → 0
View file @
b9b31c7b
File deleted
app/src/main/java/com/mints/fiveworld/ad/AdReportManager.kt
View file @
75accb5f
...
...
@@ -44,8 +44,10 @@ object AdReportManager {
const
val
EVENT_TYPE_SCENCE_SHOW
=
"12"
// 场景展示
const
val
EVENT_TYPE_SCENCE_CLOSE
=
"13"
// 场景关闭/超时
const
val
EVENT_TYPE_SCENCE_FAIL
=
"14"
// 场景失败(应用外result()失败)
const
val
EVENT_TYPE_SCENCE_TIMER_ALIVE
=
"15"
// 定时是否存活
const
val
EVENT_TYPE_SCENCE_BLACK
=
"20"
// 命中黑名单
/**上送umeng*/
enum
class
EventType
(
val
value
:
String
)
{
// 打开app 开始
...
...
@@ -113,6 +115,14 @@ object AdReportManager {
EVENT_TYPE_TIME10_NEW_CSJ_CACHE_SUC_RETURN
(
"128"
),
// 108-4 10分钟定时 广告加载成功被拦截
EVENT_TYPE_TIME10_SCENCE_BRINGTOFRONT_ANIM
(
"129"
),
// 109 10分钟定时 广告加载成功,准备请求sdk-动画动作
EVENT_TYPE_SCENCE_ONCALL_ANIM
(
"130"
),
// 109-1 10分钟定时 请求sdk成功,发起展示动画页
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ONCREATE
(
"149"
),
// 109-2 10分钟定时 定时页展示
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INTENTEXTRAS_ERROR
(
"150"
),
// 109-3 10分钟定时 定时页oncreate() 获取intent异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INITVIEW_ERROR
(
"151"
),
// 109-4 10分钟定时 定时页oncreate() 调用initView异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INITDATA_ERROR
(
"152"
),
// 109-5 10分钟定时 定时页oncreate() 调用initData异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_STARTANIM_ERROR
(
"153"
),
// 109-6 10分钟定时 定时页oncreate() 调用startAnim异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_UPDATEUI_ERROR
(
"154"
),
// 109-7 10分钟定时 定时页startAnim() 调用updateUi异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INITEXPRESS_ERROR
(
"155"
),
// 109-8 10分钟定时 定时页updateUi() 调用initExpress异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ONDESTROY_ERROR
(
"156"
),
// 109-9 10分钟定时 定时页onDestroy()异常
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ANIMATION_START
(
"131"
),
// 110 10分钟定时 定时页动画展示
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ANIMATION_END
(
"132"
),
// 110-1 10分钟定时 定时页动画结束
EVENT_TYPE_TIME10_NEW_CSJ_CACHE_SUC_FOREGROUND
(
"133"
),
// 110-2 10分钟定时 广告开始调用在前台
...
...
@@ -129,6 +139,7 @@ object AdReportManager {
EVENT_TYPE_SCENCE_OUT_TIME10_AD_COMPLETE
(
"144"
),
// 113-3 10分钟定时 穿山甲广告播放完成
EVENT_TYPE_SCENCE_OUT_TIME10_AD_CLOSE
(
"145"
),
// 113-4 10分钟定时 穿山甲关闭广告
EVENT_TYPE_SCENCE_OUT_ACTIVITY_SHOW_SUC
(
"146"
),
// 114 10分钟定时 结果页展示(广告播放完成)
// 兼容老版本未拆分
EVENT_TYPE_SCENCE_BRINGTOFRONT
(
"900"
),
// 10分钟定时 sdk请求-不会调用
EVENT_TYPE_SCENCE_ONCALL
(
"901"
),
// 10分钟定时 sdk成功-不会调用
...
...
@@ -179,22 +190,11 @@ object AdReportManager {
EVENT_TYPE_SCENCE_OUT_SCENE_AD_COMPLETE
(
"242"
),
// 218 体外场景 广告播放完成
EVENT_TYPE_SCENCE_OUT_SCENE_AD_CLOSE
(
"243"
),
// 219 体外场景 关闭广告
EVENT_TYPE_SCENCE_NEW_SCENE_RESULT_SHOW
(
"244"
),
// 220 体外场景 结果页展示成功(广告播放完成)
// 兼容老版本未拆分
EVENT_TYPE_SCENCE_NEW_BRINGTOFRONT
(
"903"
),
// 210 体外场景sdk请求-不会调用
EVENT_TYPE_SCENCE_NEW_ONCALL
(
"904"
),
// 211 sdk成功-不会调用
EVENT_TYPE_MATE_TIMER_INIT
(
"600"
),
// 体内 - 启动页 初始化匹配定时器
EVENT_TYPE_SCENCE_IN_SPLASH_AGREE
(
"601"
),
// 体内 - 启动页 点击同意
EVENT_TYPE_SCENCE_IN_SPLASH_DEVICESUC
(
"602"
),
// 体内 - 启动页 上传设备信息成功调用10秒接口
EVENT_TYPE_MATE_TIMER_GET
(
"603"
),
// 体内 - 匹配定时器请求服务10秒接口
EVENT_TYPE_MATE_TIMER_STOP
(
"604"
),
// 体内 - 匹配定时器停止
EVENT_TYPE_MATE_TIMER_SUC
(
"605"
),
// 体内 - 匹配定时器server返回结果匹配成功
EVENT_TYPE_SCENCE_IN_AD_HOT
(
"606"
),
// 体内 -定时器小火箭页 应用内广告不展示
EVENT_TYPE_SCENCE_IN_FIVE_HOT
(
"607"
),
// 体内 -定时器小火箭页 应用内不是同5
EVENT_TYPE_SCENCE_IN_FIVE_SHOW
(
"608"
),
// 体内 -定时器小火箭页 展示
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定时
...
...
@@ -207,7 +207,39 @@ object AdReportManager {
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"
),
EVENT_TYPE_HOME_CLICK_CALL
(
"308"
),
// 308 HOME-CLICK -6 是否接打电话
EVENT_TYPE_HOME_CLICK_AFTER_CHECK
(
"309"
),
// 309 HOME-CLICK 202全部校验完之后
EVENT_TYPE_HOME_CLICK_TIMER
(
"310"
),
// 310 HOME-CLICK 定时请求中
EVENT_TYPE_HOME_CLICK_TRANSPARENT_SHOW_SUC
(
"311"
),
// 311 HOME-CLICK 透明页展示
EVENT_TYPE_HOME_CLICK_LOAD_START
(
"312"
),
// 312 HOME-CLICK 广告管理类准备加载广告
EVENT_TYPE_HOME_CLICK_LOAD_START_CONFIG_SUC
(
"313"
),
// 313 HOME-CLICK config已注册成功,调用加载
EVENT_TYPE_HOME_CLICK_LOAD_START_CONFIG
(
"314"
),
// 314 HOME-CLICK config广告开始注册
EVENT_TYPE_HOME_CLICK_LOAD_START_CONFIG_LOAD
(
"315"
),
// 315 HOME-CLICK config首次注册成功,调用加载
EVENT_TYPE_HOME_CLICK_LOAD_START_ACTIVITY_NULL
(
"316"
),
// 316 HOME-CLICK 加载广告时Activity为NULL
EVENT_TYPE_HOME_CLICK_CSJ_LOAD
(
"317"
),
// 317 HOME-CLICK 准备开始加载广告
EVENT_TYPE_HOME_CLICK_AD_LOAD_FAIL
(
"318"
),
// 318 HOME-CLICK 广告加载失败
EVENT_TYPE_HOME_CLICK_CSJ_LOAD_SUC
(
"319"
),
// 319 HOME-CLICK 穿山甲加载成功
EVENT_TYPE_HOME_CLICK_CSJ_CACHE_SUC_RETURN
(
"320"
),
// 320 HOME-CLICK 广告加载成功被拦截
EVENT_TYPE_HOME_CLICK_CSJ_CACHE_SUC
(
"321"
),
// 321 HOME-CLICK 穿山甲缓存成功
EVENT_TYPE_HOME_CLICK_TRANSPARENT_ONCREATE
(
"322"
),
// 322 HOME-CLICK 场景页展示
EVENT_TYPE_HOME_CLICK_TRANSPARENT_ANIMATION_START
(
"323"
),
// 323 HOME-CLICK 场景页动画展示
EVENT_TYPE_HOME_CLICK_TRANSPARENT_ANIMATION_END
(
"324"
),
// 324 HOME-CLICK 场景页动画结束
EVENT_TYPE_HOME_CLICK_CSJ_CACHE_SUC_FOREGROUND
(
"325"
),
// 325 HOME-CLICK 广告开始调用在前台
EVENT_TYPE_HOME_CLICK_CSJ_CACHE_SUC_BACKGROUND
(
"326"
),
// 326 HOME-CLICK 广告开始调用在后台
EVENT_TYPE_HOME_CLICK_SHOW_START
(
"327"
),
// 327 HOME-CLICK 广告准备展示
EVENT_TYPE_HOME_CLICK_SHOW_START_ACTIVITY_NULL
(
"328"
),
// 328 HOME-CLICK 展示时Activity为NULL
EVENT_TYPE_HOME_CLICK_SHOW_START_TTFULLVIDEOAD_NULL
(
"329"
),
// 329 HOME-CLICK 展示时TTFullVideoAd为NULL
EVENT_TYPE_HOME_CLICK_AD_SHOW
(
"320"
),
// 330 HOME-CLICK 穿山甲广告展示成功
EVENT_TYPE_HOME_CLICK_AD_FAIL
(
"331"
),
// 331 HOME-CLICK 穿山甲广告播放失败
EVENT_TYPE_HOME_CLICK_AD_CLOSE
(
"332"
),
// 332 HOME-CLICK 穿山甲关闭广告
EVENT_TYPE_HOME_CLICK_AD_COMPLETE
(
"333"
),
// 333 HOME-CLICK 穿山甲广告播放完成
EVENT_TYPE_HOME_CLICK_AD_ERROR
(
"334"
),
// 334 HOME-CLICK 穿山甲广告播放报错
EVENT_TYPE_HOME_CLICK_AD_SKIP
(
"335"
),
// 335 HOME-CLICK 穿山甲广告跳过
EVENT_TYPE_HOME_CLICK_SHOW_AD_TRANS
(
"336"
),
// 336 HOME-CLICK 用户手动最小透明页展示广告
EVENT_TYPE_HOME_CLICK_SHOW_AD_TRANS_AUTO_CLOSE
(
"337"
),
// 337 HOME-CLICK 用户手动最小透明页展示广告
EVENT_TYPE_HOME_CLICK_ACTIVITY_SHOW_HOME_SUC
(
"338"
),
// 338 HOME-CLICK home键结果页展示(广告播放完成)
EVENT_TYPE_HOME_CLICK_ACTIVITY_SHOW_SUC
(
"339"
),
// 339 HOME-CLICK 结果页展示(广告播放完成)
}
enum
class
AdActivityType
(
val
value
:
String
)
{
...
...
@@ -233,6 +265,9 @@ object AdReportManager {
"KsFullScreenLandScapeVideoActivity"
,
"KsFullScreenVideoActivity"
,
"FeedDownloadActivity"
,
"DispatchActivity"
,
"MainSyncActivity"
,
"SyncActivity"
,
)
/**
...
...
app/src/main/java/com/mints/fiveworld/net/OkHttpInterceptor.java
View file @
75accb5f
...
...
@@ -6,6 +6,7 @@ import com.bytedance.hume.readapk.HumeSDK;
import
com.google.gson.Gson
;
import
com.mints.fiveworld.BuildConfig
;
import
com.mints.fiveworld.MintsApplication
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.DeviceInfo
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.UserManager
;
...
...
@@ -98,6 +99,7 @@ public class OkHttpInterceptor implements Interceptor {
addHeader
(
"version"
,
BuildConfig
.
VERSION_NAME
).
addHeader
(
"token"
,
tokenID
).
addHeader
(
"channel"
,
channel
).
addHeader
(
"pkgName"
,
Constant
.
MINTS_PKG_NAME
).
addHeader
(
"wifiId"
,
DeviceInfo
.
Companion
.
getInstance
().
getBssid
()).
addHeader
(
"wifiName"
,
DeviceInfo
.
Companion
.
getInstance
().
getSsid
()).
addHeader
(
"new-session"
,
MD5
.
GetMD5Code
(
String
.
valueOf
(
time
))).
...
...
app/src/main/java/com/mints/fiveworld/ui/activitys/keepalive/BoostFast2Activity.kt
0 → 100644
View file @
75accb5f
package
com.mints.fiveworld.ui.activitys.keepalive
import
android.os.Bundle
import
android.view.View
import
android.widget.FrameLayout
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.appcompat.widget.LinearLayoutCompat
import
com.mints.fiveworld.R
import
com.mints.fiveworld.ad.AdReportManager
import
com.mints.fiveworld.ad.express.ExpressAdCallback
import
com.mints.fiveworld.ad.express.OutSimpleExpress
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.CircleCleanAnimationView
import
com.mints.fiveworld.ui.widgets.RoundRectLayout
import
com.mints.fiveworld.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.fiveworld.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.mints.fiveworld.utils.LogUtil
import
com.mints.fiveworld.utils.Utils
import
kotlin.random.Random
/**
* 描述:定时 动画页2
*/
class
BoostFast2Activity
:
BaseOutActivity
(),
AlarmManager
.
AlarmManagerManagedActivity
{
private
val
TAG
=
BoostFast2Activity
::
class
.
java
.
simpleName
private
var
mType
=
0
private
var
mTransparentType
=
TransparentActivity
.
TRANSPARENT_TYPE_TIMER
private
var
frameLayout
:
FrameLayout
?
=
null
private
var
ccav_speed
:
CircleCleanAnimationView
?
=
null
private
var
iv_close_boost
:
ImageView
?
=
null
private
var
tvContent_boost
:
TextView
?
=
null
private
var
adContainer
:
LinearLayoutCompat
?
=
null
private
var
mTimer
:
CountDownTimerSupport
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_boost2_fast
)
LogUtil
.
d
(
TAG
,
"onCreate 定时 动画页2"
)
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ONCREATE
.
name
)
try
{
intent
?.
extras
?.
let
{
mType
=
it
.
getInt
(
TransparentActivity
.
TIMING_TYPE
,
0
)
mTransparentType
=
it
.
getString
(
TransparentActivity
.
TRANSPARENT_TYPE
,
TransparentActivity
.
TRANSPARENT_TYPE_TIMER
)
}
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INTENTEXTRAS_ERROR
.
name
)
e
.
printStackTrace
()
}
try
{
initView
()
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INITVIEW_ERROR
.
name
)
e
.
printStackTrace
()
}
try
{
initData
()
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INITDATA_ERROR
.
name
)
e
.
printStackTrace
()
}
startAnim
()
}
private
fun
initView
()
{
frameLayout
=
findViewById
<
RoundRectLayout
>(
R
.
id
.
fl_ad_boost_two
)
ccav_speed
=
findViewById
<
CircleCleanAnimationView
>(
R
.
id
.
ccav_speed_two
)
iv_close_boost
=
findViewById
<
ImageView
>(
R
.
id
.
iv_close_boost_two
)
tvContent_boost
=
findViewById
<
TextView
>(
R
.
id
.
tvContent_boost_two
)
adContainer
=
findViewById
<
LinearLayoutCompat
>(
R
.
id
.
adContainer_two
)
iv_close_boost
?.
setOnClickListener
{
finish
()
overridePendingTransition
(
0
,
0
)
}
}
private
fun
initData
()
{
if
(
mTransparentType
==
TransparentActivity
.
TRANSPARENT_TYPE_TIMER
)
{
WifiDataManager
.
increaseCount
(
WifiDataManager
.
TIMING
)
}
else
{
HomePopManager
.
getInstance
().
writePopTime
(
System
.
currentTimeMillis
())
WifiDataManager
.
increaseCount
(
WifiDataManager
.
HOME_CLICK
)
}
}
override
fun
onDestroy
()
{
try
{
stopTimer
()
frameLayout
?.
removeAllViews
()
frameLayout
=
null
OutSimpleExpress
.
instance
.
cmtClose
()
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ONDESTROY_ERROR
.
name
)
e
.
printStackTrace
()
}
super
.
onDestroy
()
}
private
fun
startAnim
()
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ANIMATION_START
.
name
)
try
{
when
(
mType
)
{
TransparentActivity
.
TIMING_TYPE_BOOST
->
ccav_speed
?.
setCenterImageView
(
R
.
mipmap
.
ic_app_out_timing_boost
)
TransparentActivity
.
TIMING_TYPE_CLEAN
->
ccav_speed
?.
setCenterImageView
(
R
.
mipmap
.
ic_app_out_timing_clean
)
TransparentActivity
.
TIMING_TYPE_SAVE_ELE
->
ccav_speed
?.
setCenterImageView
(
R
.
mipmap
.
ic_app_out_timing_save_ele
)
TransparentActivity
.
TIMING_TYPE_COOL
->
ccav_speed
?.
setCenterImageView
(
R
.
mipmap
.
ic_app_out_timing_cool
)
TransparentActivity
.
TIMING_TYPE_SAFE
->
ccav_speed
?.
setCenterImageView
(
R
.
mipmap
.
ic_app_out_timing_safe
)
TransparentActivity
.
TIMING_TYPE_PRICARY
->
ccav_speed
?.
setCenterImageView
(
R
.
mipmap
.
ic_app_out_timing_pricary
)
}
ccav_speed
?.
startAnimation
()
// 延迟跳转
val
time
=
(
WifiDataManager
.
getAnimInterval
()
*
1000
).
toLong
()
//1000
val
allTime
=
time
+
2000
// 4000
if
(
mTimer
!=
null
)
{
mTimer
!!
.
stop
()
mTimer
=
null
}
mTimer
=
CountDownTimerSupport
(
allTime
,
1000L
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
LogUtil
.
d
(
TAG
,
"onTick ->>>>> millisUntilFinished=$millisUntilFinished time=$time"
)
if
(
millisUntilFinished
==
allTime
-
time
)
{
LogUtil
.
d
(
TAG
,
"onTick ->>>>> 进来了"
)
// 动画结束
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_ANIMATION_END
.
name
)
AppOutWifiAdManager
.
instance
.
tempShowAd
(
this
@BoostFast2Activity
)
}
}
override
fun
onFinish
()
{
if
(!
this
@BoostFast2Activity
.
isFinishing
)
{
LogUtil
.
d
(
TAG
,
"onFinish ->>>>> 执行了"
)
updateUi
()
}
}
})
mTimer
?.
start
()
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_STARTANIM_ERROR
.
name
)
e
.
printStackTrace
()
}
}
private
fun
updateUi
()
{
try
{
ccav_speed
?.
stopAnimation
()
ccav_speed
?.
visibility
=
View
.
GONE
adContainer
?.
visibility
=
View
.
VISIBLE
var
contentStr
=
StringBuilder
()
when
(
mType
)
{
TransparentActivity
.
TIMING_TYPE_BOOST
->
contentStr
.
append
(
"手机速度已达最佳"
)
TransparentActivity
.
TIMING_TYPE_CLEAN
->
{
contentStr
.
append
(
"已为您清理"
+
(
10
+
Random
.
nextInt
(
20
))
+
"MB垃圾"
+
"\n垃圾清理已完成"
)
}
TransparentActivity
.
TIMING_TYPE_SAVE_ELE
->
{
contentStr
.
append
(
"已为您延长待机时间"
+
(
10
+
Random
.
nextInt
(
20
))
+
"分钟"
)
}
TransparentActivity
.
TIMING_TYPE_COOL
->
{
contentStr
.
append
(
"手机已降温"
+
(
2
+
Random
.
nextInt
(
3
))
+
"°C"
)
}
TransparentActivity
.
TIMING_TYPE_SAFE
->
contentStr
.
append
(
"当前网络环境良好"
)
TransparentActivity
.
TIMING_TYPE_PRICARY
->
contentStr
.
append
(
"当前使用环境安全"
)
}
if
(
mTransparentType
==
TransparentActivity
.
TRANSPARENT_TYPE_TIMER
)
{
tvContent_boost
?.
text
=
contentStr
}
else
{
contentStr
.
append
(
"~"
)
tvContent_boost
?.
text
=
contentStr
}
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_ACTIVITY_SHOW_SUC
.
name
)
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_UPDATEUI_ERROR
.
name
)
e
.
printStackTrace
()
}
initExpress
()
}
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
OutSimpleExpress
.
instance
.
getAdView
(
object
:
ExpressAdCallback
{
override
fun
loadSuccess
(
adView
:
FrameLayout
?)
{
adView
?.
let
{
Utils
.
removeFromParent
(
it
)
frameLayout
?.
removeAllViews
()
frameLayout
?.
addView
(
it
)
}
}
override
fun
renderSuccess
(
adView
:
FrameLayout
?):
Boolean
{
if
(
this
@BoostFast2Activity
.
isFinishing
)
return
false
adView
?.
let
{
Utils
.
removeFromParent
(
it
)
frameLayout
?.
removeAllViews
()
frameLayout
?.
addView
(
it
)
return
true
}
return
false
}
override
fun
loadFail
()
{}
},
Constant
.
CARRIER_OUT_TEN_TIME
)
}
catch
(
e
:
Exception
)
{
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_OUT_TRANSPARENT_INITEXPRESS_ERROR
.
name
)
e
.
printStackTrace
()
}
}
fun
stopTimer
()
{
mTimer
?.
stop
()
mTimer
?.
setOnCountDownTimerListener
(
null
)
mTimer
=
null
}
override
fun
onBackPressed
()
{
// super.onBackPressed()
}
}
app/src/main/java/com/mints/fiveworld/ui/activitys/keepalive/BoostFastActivity.kt
View file @
75accb5f
This diff is collapsed.
Click to expand it.
app/src/main/java/com/mints/fiveworld/ui/activitys/keepalive/BoostHomeActivity.kt
0 → 100644
View file @
75accb5f
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_boost2_fast.xml
0 → 100644
View file @
75accb5f
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_40000000"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"top"
android:layout_marginStart=
"10dp"
android:layout_marginTop=
"30dp"
android:drawableLeft=
"@drawable/ic_launcher_app_out"
android:drawablePadding=
"4dp"
android:gravity=
"center_vertical"
android:text=
"@string/appName"
android:textColor=
"@color/color_50FFFFFF"
android:textSize=
"6sp"
/>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/adContainer_two"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"100dp"
android:layout_marginStart=
"30dp"
android:layout_marginEnd=
"30dp"
android:layout_marginBottom=
"10dp"
android:background=
"@mipmap/ic_app_out_background"
>
<ImageView
android:id=
"@+id/iv_close_boost_two"
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"10dp"
android:src=
"@mipmap/ic_close_app_out"
/>
<TextView
android:id=
"@+id/tvContent_boost_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_marginEnd=
"5dp"
android:drawableStart=
"@mipmap/ic_right"
android:drawablePadding=
"6dp"
android:text=
"-"
android:textColor=
"@color/white"
android:textSize=
"18sp"
/>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignTop=
"@id/tvContent_boost_two"
android:layout_toEndOf=
"@id/tvContent_boost_two"
android:src=
"@mipmap/ic_app_out_timing_star"
/>
</RelativeLayout>
<com.mints.mints.fiveworld.ui.widgets.RoundRectLayout
android:id=
"@+id/fl_ad_boost_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginStart=
"30dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"30dp"
android:background=
"@drawable/shape_gold_card"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.mints.mints.fiveworld.ui.widgets.CircleCleanAnimationView
android:id=
"@+id/ccav_speed_two"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
/>
</FrameLayout>
app/src/main/res/layout/activity_boost_fast.xml
View file @
75accb5f
...
...
@@ -34,7 +34,7 @@
android:background=
"@mipmap/ic_app_out_background"
>
<ImageView
android:id=
"@+id/iv_close"
android:id=
"@+id/iv_close
_boost
"
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentEnd=
"true"
...
...
@@ -43,7 +43,7 @@
android:src=
"@mipmap/ic_close_app_out"
/>
<TextView
android:id=
"@+id/tvContent"
android:id=
"@+id/tvContent
_boost
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
...
...
@@ -57,13 +57,13 @@
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignTop=
"@id/tvContent"
android:layout_toEndOf=
"@id/tvContent"
android:layout_alignTop=
"@id/tvContent
_boost
"
android:layout_toEndOf=
"@id/tvContent
_boost
"
android:src=
"@mipmap/ic_app_out_timing_star"
/>
</RelativeLayout>
<com.mints.fiveworld.ui.widgets.RoundRectLayout
<com.mints.
mints.
fiveworld.ui.widgets.RoundRectLayout
android:id=
"@+id/fl_ad_boost"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -75,16 +75,7 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- <View-->
<!-- android:id="@+id/container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginStart="50dp"-->
<!-- android:layout_marginTop="200dp"-->
<!-- android:layout_marginEnd="50dp"-->
<!-- android:layout_marginBottom="200dp" />-->
<com.mints.fiveworld.ui.widgets.CircleCleanAnimationView
<com.mints.mints.fiveworld.ui.widgets.CircleCleanAnimationView
android:id=
"@+id/ccav_speed"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
...
...
app/src/main/res/layout/activity_boost_home.xml
0 → 100644
View file @
75accb5f
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_40000000"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"top"
android:layout_marginStart=
"10dp"
android:layout_marginTop=
"30dp"
android:drawableLeft=
"@drawable/ic_launcher_app_out"
android:drawablePadding=
"4dp"
android:gravity=
"center_vertical"
android:text=
"@string/appName"
android:textColor=
"@color/color_50FFFFFF"
android:textSize=
"6sp"
/>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/adContainer_home"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"100dp"
android:layout_marginStart=
"30dp"
android:layout_marginEnd=
"30dp"
android:layout_marginBottom=
"10dp"
android:background=
"@mipmap/ic_app_out_background"
>
<ImageView
android:id=
"@+id/iv_close_boost_home"
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"10dp"
android:src=
"@mipmap/ic_close_app_out"
/>
<TextView
android:id=
"@+id/tvContent_boost_home"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_marginEnd=
"5dp"
android:drawableStart=
"@mipmap/ic_right"
android:drawablePadding=
"6dp"
android:text=
"-"
android:textColor=
"@color/white"
android:textSize=
"18sp"
/>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignTop=
"@id/tvContent_boost_home"
android:layout_toEndOf=
"@id/tvContent_boost_home"
android:src=
"@mipmap/ic_app_out_timing_star"
/>
</RelativeLayout>
<com.mints.mints.fiveworld.ui.widgets.RoundRectLayout
android:id=
"@+id/fl_ad_boost_home"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginStart=
"30dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"30dp"
android:background=
"@drawable/shape_gold_card"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.mints.mints.fiveworld.ui.widgets.CircleCleanAnimationView
android:id=
"@+id/ccav_speed_home"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
/>
</FrameLayout>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment