Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold_pro
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_highgold_pro
Commits
994f9525
Commit
994f9525
authored
Mar 08, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
4d0eb8b3
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1722 additions
and
254 deletions
+1722
-254
build.gradle
app/build.gradle
+3
-1
kssdk-ad-3.3.6-publishRelease.aar
app/libs/kssdk-ad-3.3.6-publishRelease.aar
+0
-0
40805.dat
app/src/main/assets/40805.dat
+0
-0
MintsApplication.java
app/src/main/java/com/mints/goldspace/MintsApplication.java
+7
-4
KsPreLoadExpressManager.kt
...com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
+321
-0
PreLoadExpressManager.kt
...a/com/mints/goldspace/ad/express/PreLoadExpressManager.kt
+111
-21
TTPreLoadExpressManager.java
...m/mints/goldspace/ad/express/TTPreLoadExpressManager.java
+13
-20
TTPreLoadExpressXmlyManager.java
...nts/goldspace/ad/express/TTPreLoadExpressXmlyManager.java
+1
-0
YlhPreLoadExpressManager.kt
...om/mints/goldspace/ad/express/YlhPreLoadExpressManager.kt
+3
-14
CsjFullVideoAdManager.java
...a/com/mints/goldspace/ad/video/CsjFullVideoAdManager.java
+4
-6
CsjVideoAdManager.java
.../java/com/mints/goldspace/ad/video/CsjVideoAdManager.java
+1
-2
KsVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
+126
-0
MhVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/MhVideoAdManager.kt
+5
-17
ShVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/ShVideoAdManager.kt
+7
-13
VideoAdingManager.java
.../java/com/mints/goldspace/ad/video/VideoAdingManager.java
+60
-7
WnVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/WnVideoAdManager.kt
+5
-17
YlhVideoAdManager.java
.../java/com/mints/goldspace/ad/video/YlhVideoAdManager.java
+3
-11
BaseVideoAd.kt
...ain/java/com/mints/goldspace/ad/video/base/BaseVideoAd.kt
+2
-9
AppConfig.java
app/src/main/java/com/mints/goldspace/common/AppConfig.java
+7
-1
Constant.kt
app/src/main/java/com/mints/goldspace/common/Constant.kt
+7
-0
CpdManager.kt
app/src/main/java/com/mints/goldspace/manager/CpdManager.kt
+122
-0
KsManager.kt
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
+38
-0
TzManager.kt
app/src/main/java/com/mints/goldspace/manager/TzManager.kt
+5
-5
DrawcashBean.java
...main/java/com/mints/goldspace/mvp/model/DrawcashBean.java
+10
-0
FlowAdRulesBean.java
...n/java/com/mints/goldspace/mvp/model/FlowAdRulesBean.java
+25
-0
SydCpdListBean.java
...in/java/com/mints/goldspace/mvp/model/SydCpdListBean.java
+214
-0
TzTaskBean.java
...c/main/java/com/mints/goldspace/mvp/model/TzTaskBean.java
+11
-17
UserTaskMsgBean.java
...n/java/com/mints/goldspace/mvp/model/UserTaskMsgBean.java
+5
-1
VedioRulesBean.java
...in/java/com/mints/goldspace/mvp/model/VedioRulesBean.java
+24
-0
TaskPresenter.kt
.../java/com/mints/goldspace/mvp/presenters/TaskPresenter.kt
+41
-7
TaskView.kt
app/src/main/java/com/mints/goldspace/mvp/views/TaskView.kt
+4
-1
CpdService.java
app/src/main/java/com/mints/goldspace/net/CpdService.java
+1
-1
DrawcashActivity.kt
...java/com/mints/goldspace/ui/activitys/DrawcashActivity.kt
+6
-2
TaskCpdActivity.kt
.../java/com/mints/goldspace/ui/activitys/TaskCpdActivity.kt
+1
-1
MainFragment.kt
...main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
+14
-3
MyFragment.kt
...c/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
+14
-3
TaskCpdFragment.kt
...n/java/com/mints/goldspace/ui/fragment/TaskCpdFragment.kt
+163
-65
native_item_btn_bg.xml
app/src/main/res/drawable/native_item_btn_bg.xml
+8
-0
native_item_app_download.xml
app/src/main/res/layout/native_item_app_download.xml
+60
-0
native_item_group_image.xml
app/src/main/res/layout/native_item_group_image.xml
+90
-0
native_item_h5_open.xml
app/src/main/res/layout/native_item_h5_open.xml
+34
-0
native_item_normal.xml
app/src/main/res/layout/native_item_normal.xml
+16
-0
native_item_single_image.xml
app/src/main/res/layout/native_item_single_image.xml
+64
-0
native_item_video.xml
app/src/main/res/layout/native_item_video.xml
+64
-0
test_ad_label_gray.png
app/src/main/res/mipmap-xxhdpi/test_ad_label_gray.png
+0
-0
test_app_default_icon.png
app/src/main/res/mipmap-xxhdpi/test_app_default_icon.png
+0
-0
test_dislike_gray.png
app/src/main/res/mipmap-xxhdpi/test_dislike_gray.png
+0
-0
local.properties
local.properties
+2
-5
No files found.
app/build.gradle
View file @
994f9525
...
...
@@ -251,7 +251,7 @@ dependencies {
// 枫岚
implementation
(
name:
'mh-adsdk'
,
ext:
'aar'
)
implementation
(
name:
'mh-adsdk-ext'
,
ext:
'aar'
)
implementation
(
name:
'ks_3.3.5.3'
,
ext:
'aar'
)
//
implementation(name: 'ks_3.3.5.3', ext: 'aar')
// 聚乐云
implementation
(
name:
'okgo-2.2'
,
ext:
'aar'
)
implementation
(
name:
'scenemodule-2.2'
,
ext:
'aar'
)
...
...
@@ -267,6 +267,8 @@ dependencies {
implementation
(
name:
'tzsdk_coral-2.0.0-20200807131516-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_core-3.0.0-20200807131516-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_reporter-3.0.0-20200807131516-release'
,
ext:
'aar'
)
// 快手
implementation
(
name:
'kssdk-ad-3.3.6-publishRelease'
,
ext:
'aar'
)
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
app/libs/kssdk-ad-3.3.6-publishRelease.aar
0 → 100644
View file @
994f9525
File added
app/src/main/assets/40805.dat
View file @
994f9525
No preview for this file type
app/src/main/java/com/mints/goldspace/MintsApplication.java
View file @
994f9525
...
...
@@ -12,7 +12,7 @@ import androidx.multidex.MultiDexApplication;
import
com.hjq.toast.ToastUtils
;
import
com.mints.goldspace.common.Constant
;
import
com.mints.goldspace.manager.
Channel
Manager
;
import
com.mints.goldspace.manager.
Ks
Manager
;
import
com.mints.goldspace.manager.LiebaoManager
;
import
com.mints.goldspace.manager.MhManager
;
import
com.mints.goldspace.manager.MiitHelper
;
...
...
@@ -119,12 +119,18 @@ public class MintsApplication extends MultiDexApplication {
// 穿山甲
TtCsjAdManager
.
init
(
this
);
// 快手
KsManager
.
INSTANCE
.
initKs
(
this
);
// 闪电盒子
WnManager
.
INSTANCE
.
initWn
(
this
);
// 枫岚广告
MhManager
.
INSTANCE
.
initWn
(
this
);
// 天卓珊瑚
TzManager
.
INSTANCE
.
initTz
(
this
);
// 一览视频
YlVideoManager
.
INSTANCE
.
init
(
this
);
...
...
@@ -140,9 +146,6 @@ public class MintsApplication extends MultiDexApplication {
// 自定义logger
bindLogger
();
// 天卓珊瑚
TzManager
.
INSTANCE
.
initTz
(
this
);
// 子线程初始化三方SDK
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
if
(
processName
!=
null
)
{
...
...
app/src/main/java/com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
0 → 100644
View file @
994f9525
This diff is collapsed.
Click to expand it.
app/src/main/java/com/mints/goldspace/ad/express/PreLoadExpressManager.kt
View file @
994f9525
package
com.mints.goldspace.ad.express
import
android.view.View
import
android.view.ViewGroup
import
android.widget.FrameLayout
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.mvp.model.WeightBean
import
com.mints.goldspace.utils.LogUtil
import
com.qq.e.ads.nativ.NativeExpressADView
import
java.util.*
object
PreLoadExpressManager
:
TTADLoadSuccessListener
,
YLHADLoadSuccessListener
{
// 是否是穿山甲信息流
@Volatile
private
var
isTTExpressAd
=
false
/**
* 预加载信息流管理类
*/
object
PreLoadExpressManager
:
TTADLoadSuccessListener
,
YLHADLoadSuccessListener
,
KSADLoadSuccessListener
{
private
val
TAG
=
PreLoadExpressManager
::
class
.
java
.
simpleName
// @Volatile
// private var currentIndex = 0
@Volatile
private
var
mAdFrameLayout
:
FrameLayout
?
=
null
private
var
weightList
:
MutableList
<
WeightBean
>
=
mutableListOf
()
private
var
csjWeight
=
0
private
var
ylhWeight
=
0
private
var
ksWeight
=
0
init
{
mAdFrameLayout
=
FrameLayout
(
MintsApplication
.
getContext
())
YlhPreLoadExpressManager
.
setListener
(
this
)
TTPreLoadExpressManager
.
getInstance
().
setListener
(
this
)
KsPreLoadExpressManager
.
setListener
(
this
)
}
fun
init
(
csjWeight
:
Int
,
ylhWeight
:
Int
,
ksWeight
:
Int
)
{
PreLoadExpressManager
.
csjWeight
=
csjWeight
PreLoadExpressManager
.
ylhWeight
=
ylhWeight
PreLoadExpressManager
.
ksWeight
=
ksWeight
}
fun
loadADFrameLayout
()
{
mAdFrameLayout
?.
removeAllViews
()
if
(
isTTExpressAd
)
{
TTPreLoadExpressManager
.
getInstance
().
loadTtFrameLayout
(
mAdFrameLayout
)
}
else
{
YlhPreLoadExpressManager
.
loadYlhFrameLayout
()
// when (++currentIndex) {
// 1 -> {
// TTPreLoadExpressManager.getInstance().loadTtFrameLayout(mAdFrameLayout)
// }
// 2 -> {
// YlhPreLoadExpressManager.loadYlhFrameLayout()
// }
// 3 -> {
// KsPreLoadExpressManager.loadKsFrameLayout(mAdFrameLayout as ViewGroup)
// }
// }
when
(
getRandomWeight
())
{
Constant
.
CSJ_EXPRESS_AD
->
TTPreLoadExpressManager
.
getInstance
().
loadTtFrameLayout
(
mAdFrameLayout
)
Constant
.
YLH_EXPRESS_AD
->
YlhPreLoadExpressManager
.
loadYlhFrameLayout
()
Constant
.
KS_EXPRESS_AD
->
KsPreLoadExpressManager
.
loadKsFrameLayout
(
mAdFrameLayout
as
ViewGroup
)
else
->
{
TTPreLoadExpressManager
.
getInstance
().
loadTtFrameLayout
(
mAdFrameLayout
)
}
}
}
/**
* 根据权重获取广告类型
*/
private
fun
getRandomWeight
():
String
{
weightList
.
clear
()
var
weight
=
0
// 若没有视频完成数,不加入权重计算范围内
if
(
csjWeight
>
0
)
{
weightList
.
add
(
WeightBean
(
csjWeight
,
Constant
.
CSJ_EXPRESS_AD
))
weight
+=
csjWeight
LogUtil
.
d
(
TAG
,
"EXPRESS权重值:csjWeight:$csjWeight"
)
}
if
(
ylhWeight
>
0
)
{
weightList
.
add
(
WeightBean
(
ylhWeight
,
Constant
.
YLH_EXPRESS_AD
))
weight
+=
ylhWeight
LogUtil
.
d
(
TAG
,
"EXPRESS权重值:ylhWeight:$ylhWeight"
)
}
if
(
ksWeight
>
0
)
{
weightList
.
add
(
WeightBean
(
ksWeight
,
Constant
.
KS_EXPRESS_AD
))
weight
+=
ksWeight
LogUtil
.
d
(
TAG
,
"EXPRESS权重值:ksWeight:$ksWeight"
)
}
// 权重随机
if
(
weightList
.
size
>
0
&&
weight
>
0
)
{
LogUtil
.
d
(
TAG
,
"1、权重总值EXPRESS:$weight"
)
val
r
=
Random
()
var
randomWeight
=
r
.
nextInt
(
weight
)
+
1
LogUtil
.
d
(
TAG
,
"2、权重随机值EXPRESS:$randomWeight"
)
// ToastUtil.show(MintsApplication.getContext(), "权重随机值EXPRESS:" + randomWeight);
for
(
weightBean
in
weightList
)
{
randomWeight
-=
weightBean
.
weight
if
(
randomWeight
<=
0
)
{
LogUtil
.
d
(
TAG
,
"3、权重结果EXPRESS:"
+
weightBean
.
type
)
return
weightBean
.
type
}
}
}
return
""
}
fun
getADFrameLayout
():
FrameLayout
?
{
// mAdFrameLayout = if (isTTExpressAd) {
// TTPreLoadExpressManager.getInstance().ttFrameLayout
// } else {
// YlhPreLoadExpressManager.getYlhFrameLayout()
// }
isTTExpressAd
=
!
isTTExpressAd
// if (currentIndex >= 3) currentIndex = 0
return
mAdFrameLayout
}
fun
onDestroy
()
{
TTPreLoadExpressManager
.
getInstance
().
onDestroy
()
YlhPreLoadExpressManager
.
onDestroy
()
KsPreLoadExpressManager
.
onDestroy
()
}
override
fun
onTTAdLoadSuc
(
adFrameLayout
:
FrameLayout
?)
{
if
(
isTTExpressAd
)
{
mAdFrameLayout
=
adFrameLayout
}
// if (currentIndex == 1) {
// mAdFrameLayout = adFrameLayout
// }
mAdFrameLayout
=
adFrameLayout
}
override
fun
onYlhAdLoadSuc
(
adFrameLayout
:
NativeExpressADView
?)
{
if
(!
isTTExpressAd
)
{
mAdFrameLayout
?.
addView
(
adFrameLayout
)
}
override
fun
onYlhAdLoadSuc
(
view
:
NativeExpressADView
?)
{
// if (currentIndex == 2) {
// mAdFrameLayout?.addView(view)
// }
mAdFrameLayout
?.
addView
(
view
)
}
override
fun
onKSAdLoadSuc
(
view
:
View
?)
{
// if (currentIndex == 3) {
// mAdFrameLayout?.addView(view)
// }
mAdFrameLayout
?.
addView
(
view
)
}
}
...
...
@@ -64,4 +150,8 @@ interface TTADLoadSuccessListener {
interface
YLHADLoadSuccessListener
{
fun
onYlhAdLoadSuc
(
view
:
NativeExpressADView
?)
}
interface
KSADLoadSuccessListener
{
fun
onKSAdLoadSuc
(
ksNativeAd
:
View
?)
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ad/express/TTPreLoadExpressManager.java
View file @
994f9525
package
com
.
mints
.
goldspace
.
ad
.
express
;
import
android.util.DisplayMetrics
;
import
android.widget.FrameLayout
;
import
com.mints.goldspace.MintsApplication
;
import
com.mints.goldspace.manager.TTNativeExpressManager
;
import
com.mints.goldspace.manager.TtCsjAdManager
;
...
...
@@ -9,7 +11,6 @@ public class TTPreLoadExpressManager {
private
static
TTPreLoadExpressManager
_inst
;
// private FrameLayout ttFrameLayout;
private
TTNativeExpressManager
ttNativeExpressManager
;
public
static
TTPreLoadExpressManager
getInstance
()
{
...
...
@@ -31,39 +32,31 @@ public class TTPreLoadExpressManager {
}
}
// public FrameLayout getTtFrameLayout() {
// return ttFrameLayout;
// }
private
TTADLoadSuccessListener
mADLoadSuccessListener
;
public
void
setListener
(
TTADLoadSuccessListener
adLoadSuccessListener
)
{
mADLoadSuccessListener
=
adLoadSuccessListener
;
}
private
float
getViewWidth
()
{
DisplayMetrics
displayMetrics
=
MintsApplication
.
getContext
().
getResources
().
getDisplayMetrics
();
float
density
=
displayMetrics
.
density
;
float
pxWidth
=
displayMetrics
.
widthPixels
-
(
50
*
density
+
0.5f
);
float
dpWidth
=
pxWidth
/
density
+
0.5f
;
return
dpWidth
;
}
/**
* 预加载 信息流
*/
public
void
loadTtFrameLayout
(
FrameLayout
adFrameLayout
)
{
init
();
// Context context = MintsApplication.getContext();
// ttFrameLayout = null;
try
{
// FrameLayout ttFrameLayout = new FrameLayout(context);
ttNativeExpressManager
.
getNativeExpressInit
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_AWARD
,
adFrameLayout
,
310
,
0
);
ttNativeExpressManager
.
getNativeExpressInit
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_AWARD
,
adFrameLayout
,
getViewWidth
(),
0
);
ttNativeExpressManager
.
setTTNativeExpressManagerListener
(
view
->
{
// if (view == null) {
// ttFrameLayout = null;
// } else {
//
// try {
// ttFrameLayout = view;
// } catch (Exception e) {
// e.printStackTrace();
// ttFrameLayout = null;
// }
// }
try
{
if
(
view
!=
null
)
{
if
(
mADLoadSuccessListener
!=
null
)
{
...
...
app/src/main/java/com/mints/goldspace/ad/express/TTPreLoadExpressXmlyManager.java
View file @
994f9525
...
...
@@ -9,6 +9,7 @@ import com.mints.goldspace.manager.TTNativeExpressManager;
import
com.mints.goldspace.manager.TtCsjAdManager
;
import
com.mints.goldspace.utils.LogUtil
;
/**
* 喜马拉雅信息流
*/
...
...
app/src/main/java/com/mints/goldspace/ad/express/YlhPreLoadExpressManager.kt
View file @
994f9525
...
...
@@ -9,10 +9,11 @@ import com.qq.e.ads.nativ.NativeExpressAD
import
com.qq.e.ads.nativ.NativeExpressADView
import
com.qq.e.comm.util.AdError
/**
* 优量汇预加载信息流
*/
object
YlhPreLoadExpressManager
{
// private var ylhFrameLayout: FrameLayout? = null
private
var
nativeExpressAD
:
NativeExpressAD
?
=
null
private
var
nativeExpressADView
:
NativeExpressADView
?
=
null
...
...
@@ -22,15 +23,8 @@ object YlhPreLoadExpressManager {
mADLoadSuccessListener
=
adLoadSuccessListener
}
// fun getYlhFrameLayout(): FrameLayout? {
// return ylhFrameLayout
// }
fun
loadYlhFrameLayout
()
{
// val context = MintsApplication.getContext()
try
{
// ylhFrameLayout = FrameLayout(context)
nativeExpressAD
=
NativeExpressAD
(
MintsApplication
.
getContext
(),
ADSize
(
ADSize
.
FULL_WIDTH
,
ADSize
.
AUTO_HEIGHT
),
YlhAdManager
.
YLH_AD_NATIVEEXPRESS_AWARD
,
object
:
NativeExpressAD
.
NativeExpressADListener
{
override
fun
onNoAD
(
p0
:
AdError
?)
{
if
(
BuildConfig
.
DEBUG
)
{
...
...
@@ -59,15 +53,10 @@ object YlhPreLoadExpressManager {
nativeExpressADView
?.
destroy
()
nativeExpressADView
=
p0
?.
get
(
0
)
//
// if (ylhFrameLayout!!.childCount > 0) {
// ylhFrameLayout!!.removeAllViews()
// }
// 广告可见才会产生曝光,否则将无法产生收益。
mADLoadSuccessListener
?.
onYlhAdLoadSuc
(
nativeExpressADView
)
// ylhFrameLayout!!.addView(nativeExpressADView)
nativeExpressADView
?.
render
()
}
...
...
app/src/main/java/com/mints/goldspace/ad/video/CsjFullVideoAdManager.java
View file @
994f9525
...
...
@@ -7,12 +7,11 @@ import com.bytedance.sdk.openadsdk.TTAdConstant;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
import
com.bytedance.sdk.openadsdk.TTAdSdk
;
import
com.bytedance.sdk.openadsdk.TTFullScreenVideoAd
;
import
com.mints.goldspace.ad.video.base.BaseVideoAd
;
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
;
import
com.mints.goldspace.common.Constant
;
import
com.mints.goldspace.manager.TrackManager
;
import
com.mints.goldspace.manager.TtCsjAdManager
;
import
com.mints.goldspace.mvp.presenters.CsjFullVedioAdPresenter
;
import
com.mints.goldspace.mvp.views.VideoAdManagerView
;
/**
* 穿山甲全屏广告
...
...
@@ -30,12 +29,10 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
public
static
CsjFullVideoAdManager
getInstance
(
Activity
activity
)
{
if
(
_inst
!=
null
)
{
return
_inst
;
}
else
{
if
(
_inst
==
null
)
{
_inst
=
new
CsjFullVideoAdManager
(
activity
);
return
_inst
;
}
return
_inst
;
}
private
CsjFullVideoAdManager
(
Activity
activity
)
{
...
...
@@ -104,6 +101,7 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
if
(
videoAdStatusListener
!=
null
)
{
videoAdStatusListener
.
adSuccess
();
}
if
(
activity
!=
null
)
{
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_CSJFULL
,
extraId
,
curCoin
));
}
...
...
app/src/main/java/com/mints/goldspace/ad/video/CsjVideoAdManager.java
View file @
994f9525
package
com
.
mints
.
goldspace
.
ad
.
video
;
import
android.app.Activity
;
import
android.widget.Toast
;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
...
...
@@ -9,6 +8,7 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
import
com.bytedance.sdk.openadsdk.TTAppDownloadListener
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.mints.goldspace.BuildConfig
;
import
com.mints.goldspace.ad.video.base.BaseVideoAd
;
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
;
import
com.mints.goldspace.common.AppConfig
;
import
com.mints.goldspace.common.Constant
;
...
...
@@ -162,7 +162,6 @@ public class CsjVideoAdManager extends BaseVideoAd {
public
void
onError
(
int
code
,
String
message
)
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
LogUtil
.
d
(
"vedioAdStatusListener"
,
"onError "
+
code
+
message
);
if
(
videoAdStatusListener
!=
null
)
{
videoAdStatusListener
.
adFail
();
...
...
app/src/main/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
0 → 100644
View file @
994f9525
package
com.mints.goldspace.ad.video
import
android.app.Activity
import
com.kwad.sdk.api.KsAdSDK
import
com.kwad.sdk.api.KsLoadManager
import
com.kwad.sdk.api.KsRewardVideoAd
import
com.kwad.sdk.api.KsScene
import
com.mints.goldspace.ad.video.base.BaseVideoAd
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.manager.KsManager
import
com.mints.goldspace.manager.TrackManager
import
com.mints.goldspace.utils.LogUtil
private
val
TAG
=
KsVideoAdManager
::
class
.
java
.
simpleName
/**
* 快手广告视频
*/
class
KsVideoAdManager
private
constructor
()
:
BaseVideoAd
()
{
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
var
mRewardVideoAd
:
KsRewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
companion
object
{
private
var
_inst
:
KsVideoAdManager
?
=
null
fun
getInstance
():
KsVideoAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
KsVideoAdManager
()
_inst
}
}
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
isClickScreen
=
true
val
scene
=
KsScene
.
Builder
(
KsManager
.
KS_AD_VEDIO_POSTID
).
build
()
KsAdSDK
.
getLoadManager
().
loadRewardVideoAd
(
scene
,
object
:
KsLoadManager
.
RewardVideoAdListener
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
videoAdStatusListener
?.
adFail
()
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ONE
,
p0
.
toString
(),
p1
)
LogUtil
.
d
(
p1
)
}
override
fun
onRewardVideoAdLoad
(
p0
:
MutableList
<
KsRewardVideoAd
>?)
{
mRewardVideoAd
=
p0
?.
get
(
0
)
if
(
mRewardVideoAd
!=
null
&&
mRewardVideoAd
!!
.
isAdEnable
)
{
mRewardVideoAd
!!
.
setRewardAdInteractionListener
(
object
:
KsRewardVideoAd
.
RewardAdInteractionListener
{
override
fun
onAdClicked
()
{
// ToastUtil.show(activity, "快手激励视频⼴告点击")
if
(
AppConfig
.
needReportClickAdEvent
)
{
TrackManager
.
getInstance
().
reportClickAdEvent
()
}
LogUtil
.
d
(
TAG
,
"onADClick"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
videoAdStatusListener
?.
adDownload
()
}
override
fun
onPageDismiss
()
{
// ToastUtil.show(activity, "快手激励视频⼴告关闭")
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_KS
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
videoAdStatusListener
?.
adSuccess
()
}
override
fun
onVideoPlayError
(
p0
:
Int
,
p1
:
Int
)
{
// ToastUtil.show(activity, "快手激励视频⼴告播放出错")
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
(
p1
).
toString
())
videoAdStatusListener
?.
adFail
()
}
override
fun
onVideoPlayEnd
()
{
// ToastUtil.show(activity, "快手激励视频⼴告播放完成")
}
override
fun
onVideoPlayStart
()
{
// ToastUtil.show(activity, "快手激励视频⼴告播放开始")
}
override
fun
onRewardVerify
()
{
// ToastUtil.show(activity, "快手激励视频⼴告获取激励")
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
}
})
// PlayConfig默认竖屏播放,传null
mRewardVideoAd
!!
.
showRewardVideoAd
(
activity
,
null
)
}
}
})
}
fun
setVideoAdStatusListener
(
videoAdStatusListener
:
VideoAdStatusListener
?)
{
this
.
videoAdStatusListener
=
videoAdStatusListener
}
override
fun
onDestroy
()
{
mRewardVideoAd
=
null
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ad/video/MhVideoAdManager.kt
View file @
994f9525
...
...
@@ -2,13 +2,12 @@ package com.mints.goldspace.ad.video
import
android.app.Activity
import
com.maplehaze.adsdk.video.RewardVideoAd
import
com.mints.goldspace.ad.video.base.BaseVideoAd
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.manager.MhManager
import
com.mints.goldspace.manager.TrackManager
import
com.mints.goldspace.mvp.presenters.MhVideoAdPresenter
import
com.mints.goldspace.mvp.views.VideoAdManagerView
import
com.mints.goldspace.utils.LogUtil
private
val
TAG
=
MhVideoAdManager
::
class
.
java
.
simpleName
...
...
@@ -16,37 +15,27 @@ private val TAG = MhVideoAdManager::class.java.simpleName
/**
* 枫岚广告视频
*/
class
MhVideoAdManager
private
constructor
(
activity
:
Activity
)
:
class
MhVideoAdManager
private
constructor
()
:
BaseVideoAd
()
{
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
var
mRewardVideoAd
:
RewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
activity
:
Activity
?
=
null
companion
object
{
private
var
_inst
:
MhVideoAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
MhVideoAdManager
?
{
fun
getInstance
():
MhVideoAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
MhVideoAdManager
(
activity
)
_inst
=
MhVideoAdManager
()
_inst
}
}
}
init
{
init
(
activity
)
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
this
.
activity
=
activity
isClickScreen
=
true
val
postId
:
String
=
when
(
carrierType
)
{
...
...
@@ -86,6 +75,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
videoAdStatusListener
?.
adDownload
()
}
...
...
@@ -120,9 +110,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
this
.
videoAdStatusListener
=
videoAdStatusListener
}
override
fun
onDestroy
()
{
mRewardVideoAd
=
null
activity
=
null
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ad/video/ShVideoAdManager.kt
View file @
994f9525
...
...
@@ -4,6 +4,7 @@ import android.app.Activity
import
android.text.TextUtils
import
androidx.annotation.Nullable
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.ad.video.base.BaseVideoAd
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
...
...
@@ -29,7 +30,6 @@ class ShVideoAdManager private constructor(activity: Activity) :
BaseVideoAd
()
{
private
var
isClickScreen
:
Boolean
=
true
private
var
activity
:
Activity
?
=
null
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
lateinit
var
ps
:
AppPreferences
...
...
@@ -60,21 +60,19 @@ class ShVideoAdManager private constructor(activity: Activity) :
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
ps
=
AppPreferences
(
activity
)
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
this
.
activity
=
activity
isClickScreen
=
true
//
val type = TZ_REWRAD_TYPE_RELEASE
val
type
=
TZ_REWRAD_TYPE_RELEASE
val
type
=
if
(
BuildConfig
.
DEBUG
)
{
TZ_REWRAD_TYPE_DEBUG
}
else
{
TZ_REWRAD_TYPE_RELEASE
}
//
val type = if (BuildConfig.DEBUG) {
//
TZ_REWRAD_TYPE_DEBUG
//
} else {
//
TZ_REWRAD_TYPE_RELEASE
//
}
ADLoader
(
activity
)
.
get
(
ADType
.
REWARD_VIDEO
)
...
...
@@ -178,10 +176,6 @@ class ShVideoAdManager private constructor(activity: Activity) :
this
.
videoAdStatusListener
=
videoAdStatusListener
}
override
fun
onDestroy
()
{
activity
=
null
}
private
fun
getAdMapVO
(
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?):
HashMap
<
String
,
Any
>
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
...
...
app/src/main/java/com/mints/goldspace/ad/video/VideoAdingManager.java
View file @
994f9525
...
...
@@ -7,7 +7,6 @@ import android.content.Intent;
import
android.content.IntentFilter
;
import
android.text.TextUtils
;
import
com.mints.goldspace.MintsApplication
;
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
;
import
com.mints.goldspace.common.AppConfig
;
import
com.mints.goldspace.common.Constant
;
...
...
@@ -17,7 +16,6 @@ import com.mints.goldspace.mvp.model.WeightBean;
import
com.mints.goldspace.service.AppInstallService
;
import
com.mints.goldspace.utils.AppUtil
;
import
com.mints.goldspace.utils.LogUtil
;
import
com.mints.goldspace.utils.ToastUtil
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
...
...
@@ -40,6 +38,7 @@ public class VideoAdingManager {
private
MhVideoAdManager
mhVideoAdManager
;
private
ShVideoAdManager
shVideoAdManager
;
private
CsjFullVideoAdManager
csjFullVideoAdManager
;
private
KsVideoAdManager
ksVideoAdManager
;
private
int
wnWeight
;
private
int
ylhWeight
;
...
...
@@ -47,6 +46,7 @@ public class VideoAdingManager {
private
int
flVideoWeight
;
private
int
shVideoWeight
;
private
int
csjFullVideoWeight
;
private
int
ksVideoWeight
;
private
ArrayList
<
WeightBean
>
weightList
;
...
...
@@ -78,10 +78,11 @@ public class VideoAdingManager {
this
.
activity
=
activity
;
csjVideoAdManager
=
CsjVideoAdManager
.
getInstance
(
activity
);
ylhVideoAdManager
=
YlhVideoAdManager
.
getInstance
();
wnVideoAdManager
=
WnVideoAdManager
.
Companion
.
getInstance
(
activity
);
mhVideoAdManager
=
MhVideoAdManager
.
Companion
.
getInstance
(
activity
);
wnVideoAdManager
=
WnVideoAdManager
.
Companion
.
getInstance
();
mhVideoAdManager
=
MhVideoAdManager
.
Companion
.
getInstance
();
shVideoAdManager
=
ShVideoAdManager
.
Companion
.
getInstance
(
activity
);
csjFullVideoAdManager
=
CsjFullVideoAdManager
.
getInstance
(
activity
);
ksVideoAdManager
=
KsVideoAdManager
.
Companion
.
getInstance
();
weightList
=
new
ArrayList
<>();
}
...
...
@@ -127,13 +128,21 @@ public class VideoAdingManager {
/**
* 初始化广告权重
*/
public
void
initAdWeight
(
int
csjVideoWeight
,
int
ylhWeight
,
int
wnWeight
,
int
flVideoWeight
,
int
shVideoWeight
,
int
csjFullVideoWeight
)
{
public
void
initAdWeight
(
int
csjVideoWeight
,
int
ylhWeight
,
int
wnWeight
,
int
flVideoWeight
,
int
shVideoWeight
,
int
csjFullVideoWeight
,
int
ksVideoWeight
)
{
this
.
csjVideoWeight
=
csjVideoWeight
;
this
.
ylhWeight
=
ylhWeight
;
this
.
wnWeight
=
wnWeight
;
this
.
flVideoWeight
=
flVideoWeight
;
this
.
shVideoWeight
=
shVideoWeight
;
this
.
csjFullVideoWeight
=
csjFullVideoWeight
;
this
.
ksVideoWeight
=
ksVideoWeight
;
}
/**
...
...
@@ -206,6 +215,8 @@ public class VideoAdingManager {
nextAdType
=
Constant
.
CSJ_FULL_AD
;
}
else
if
(
AppConfig
.
shVideoAdCount
>
0
)
{
nextAdType
=
Constant
.
SH_VEDIO_AD
;
}
else
if
(
AppConfig
.
ksVideoAdCount
>
0
)
{
nextAdType
=
Constant
.
KS_VEDIO_AD
;
}
else
{
nextAdType
=
Constant
.
FL_VEDIO_AD
;
}
...
...
@@ -288,6 +299,11 @@ public class VideoAdingManager {
weight
=
weight
+
shVideoWeight
;
LogUtil
.
d
(
TAG
,
"权重值:shWeight:"
+
shVideoWeight
);
}
if
(
AppConfig
.
ksVideoAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
ksVideoWeight
,
Constant
.
KS_VEDIO_AD
));
weight
=
weight
+
ksVideoWeight
;
LogUtil
.
d
(
TAG
,
"权重值:ksWeight:"
+
ksVideoWeight
);
}
// 权重随机
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
&&
weight
>
0
)
{
...
...
@@ -487,7 +503,7 @@ public class VideoAdingManager {
}
return
;
}
wnVideoAdManager
=
WnVideoAdManager
.
Companion
.
getInstance
(
activity
);
wnVideoAdManager
=
WnVideoAdManager
.
Companion
.
getInstance
();
}
wnVideoAdManager
.
setVideoAdStatusListener
(
new
VideoAdStatusListener
()
{
@Override
...
...
@@ -523,7 +539,7 @@ public class VideoAdingManager {
}
return
;
}
mhVideoAdManager
=
MhVideoAdManager
.
Companion
.
getInstance
(
activity
);
mhVideoAdManager
=
MhVideoAdManager
.
Companion
.
getInstance
();
}
mhVideoAdManager
.
setVideoAdStatusListener
(
new
VideoAdStatusListener
()
{
@Override
...
...
@@ -625,6 +641,43 @@ public class VideoAdingManager {
});
shVideoAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
videoAdType
,
Constant
.
KS_VEDIO_AD
))
{
// 快手广告激励视频
if
(
ksVideoAdManager
==
null
)
{
if
(
activity
==
null
)
{
if
(
videoAdingListener
!=
null
)
{
videoAdingListener
.
videoAdingListenerError
(
Constant
.
KS_VEDIO_AD
);
}
return
;
}
ksVideoAdManager
=
KsVideoAdManager
.
Companion
.
getInstance
();
}
ksVideoAdManager
.
setVideoAdStatusListener
(
new
VideoAdStatusListener
()
{
@Override
public
void
adSuccess
()
{
AppConfig
.
ksVideoAdCount
--;
if
(
videoAdingListener
!=
null
)
{
videoAdingListener
.
videoAdingListenerSuccess
(
Constant
.
KS_VEDIO_AD
);
}
}
@Override
public
void
adFail
()
{
if
(
videoAdingListener
!=
null
)
{
videoAdingListener
.
videoAdingListenerFail
(
Constant
.
KS_VEDIO_AD
);
}
}
@Override
public
void
adDownload
()
{
isVideoAdDownload
=
true
;
// 注册下载任务监听
registerBroad
();
}
});
ksVideoAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
app/src/main/java/com/mints/goldspace/ad/video/WnVideoAdManager.kt
View file @
994f9525
package
com.mints.goldspace.ad.video
import
android.app.Activity
import
com.mints.goldspace.ad.video.base.BaseVideoAd
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.manager.TrackManager
import
com.mints.goldspace.manager.WnManager
import
com.mints.goldspace.mvp.presenters.WnVideoAdPresenter
import
com.mints.goldspace.mvp.views.VideoAdManagerView
import
com.mints.goldspace.utils.LogUtil
import
com.wannuosili.sdk.*
...
...
@@ -16,37 +15,27 @@ private val TAG = WnVideoAdManager::class.java.simpleName
/**
* 闪电盒子视频
*/
class
WnVideoAdManager
private
constructor
(
activity
:
Activity
)
:
class
WnVideoAdManager
private
constructor
()
:
BaseVideoAd
()
{
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
var
mRewardVideoAd
:
WNRewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
activity
:
Activity
?
=
null
companion
object
{
private
var
_inst
:
WnVideoAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
WnVideoAdManager
?
{
fun
getInstance
():
WnVideoAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
WnVideoAdManager
(
activity
)
_inst
=
WnVideoAdManager
()
_inst
}
}
}
init
{
init
(
activity
)
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
this
.
activity
=
activity
isClickScreen
=
true
val
postId
:
String
=
when
(
carrierType
)
{
...
...
@@ -108,6 +97,7 @@ class WnVideoAdManager private constructor(activity: Activity) :
if
(
ad
.
type
==
WNAdConstant
.
AD_TYPE_DOWNLOAD
)
{
ad
.
downloadListener
=
object
:
WNAdDownloadListener
{
override
fun
onDownloadStarted
(
totalBytes
:
Long
,
fileName
:
String
,
appName
:
String
)
{
// showToast("开始下载")
}
override
fun
onDownloadFinished
(
totalBytes
:
Long
,
fileName
:
String
,
appName
:
String
)
{}
...
...
@@ -131,7 +121,5 @@ class WnVideoAdManager private constructor(activity: Activity) :
it
.
interactionListener
=
null
}
mRewardVideoAd
=
null
activity
=
null
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ad/video/YlhVideoAdManager.java
View file @
994f9525
...
...
@@ -2,23 +2,17 @@ package com.mints.goldspace.ad.video;
import
android.app.Activity
;
import
android.os.SystemClock
;
import
com.mints.goldspace.MintsApplication
;
import
com.mints.goldspace.ad.video.base.BaseVideoAd
;
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
;
import
com.mints.goldspace.common.AppConfig
;
import
com.mints.goldspace.common.Constant
;
import
com.mints.goldspace.manager.TrackManager
;
import
com.mints.goldspace.manager.YlhAdManager
;
import
com.mints.goldspace.mvp.presenters.YlhVideoAdPresenter
;
import
com.mints.goldspace.mvp.views.VideoAdManagerView
;
import
com.mints.goldspace.utils.LogUtil
;
import
com.mints.goldspace.utils.ToastUtil
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.comm.util.AdError
;
import
java.lang.ref.WeakReference
;
/**
* 优量汇视频
*/
...
...
@@ -34,12 +28,10 @@ public class YlhVideoAdManager extends BaseVideoAd {
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
public
static
YlhVideoAdManager
getInstance
()
{
if
(
_inst
!=
null
)
{
return
_inst
;
}
else
{
if
(
_inst
==
null
)
{
_inst
=
new
YlhVideoAdManager
();
return
_inst
;
}
return
_inst
;
}
@Override
...
...
app/src/main/java/com/mints/goldspace/ad/video/BaseVideoAd.kt
→
app/src/main/java/com/mints/goldspace/ad/video/
base/
BaseVideoAd.kt
View file @
994f9525
package
com.mints.goldspace.ad.video
package
com.mints.goldspace.ad.video
.base
import
android.app.Activity
import
android.content.DialogInterface
import
android.text.TextUtils
import
android.view.KeyEvent
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.mvp.views.BaseView
import
com.mints.goldspace.ui.widgets.LoadingDialog
import
com.mints.goldspace.utils.ToastUtil
import
java.util.HashMap
import
java.util.*
open
class
BaseVideoAd
{
/**
...
...
app/src/main/java/com/mints/goldspace/common/AppConfig.java
View file @
994f9525
...
...
@@ -79,16 +79,22 @@ public class AppConfig {
/**
* flVideo 剩余广告播放数
*/
public
static
int
flVedioAdCount
=
5
;
/**
* csjFull 剩余广告播放数
*/
public
static
int
csjFullVedioAdCount
=
5
;
/**
* flVideo 剩余广告播放数
*/
public
static
int
flVideoAdCount
=
5
;
/**
* shVideo 剩余广告播放数
*/
public
static
int
shVideoAdCount
=
5
;
/**
* ksVideo 剩余广告播放数
*/
public
static
int
ksVideoAdCount
=
5
;
/**
* 高额试玩任务标识
...
...
app/src/main/java/com/mints/goldspace/common/Constant.kt
View file @
994f9525
...
...
@@ -148,6 +148,7 @@ object Constant {
const
val
AD_SOURCE_FL
=
"FL"
//枫岚
const
val
AD_SOURCE_CSJFULL
=
"CSJFULL"
const
val
AD_SOURCE_SH
=
"CORAL"
//珊瑚天卓
const
val
AD_SOURCE_KS
=
"KS"
//快手
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const
val
EVENT_TYPE_ZERO
=
"0"
...
...
@@ -168,6 +169,12 @@ object Constant {
const
val
FL_VEDIO_AD
=
"Fl_VEDIO_AD"
const
val
CSJ_FULL_AD
=
"CSJFULL_VEDIO_AD"
const
val
SH_VEDIO_AD
=
"SH_VEDIO_AD"
const
val
KS_VEDIO_AD
=
"KS_VEDIO_AD"
// 信息流广告类型
const
val
CSJ_EXPRESS_AD
=
"CSJ_EXPRESS_AD"
const
val
YLH_EXPRESS_AD
=
"YLH_EXPRESS_AD"
const
val
KS_EXPRESS_AD
=
"KS_EXPRESS_AD"
// 游戏类型
const
val
EVENT_TYPE_CLICK
=
"CLICK"
...
...
app/src/main/java/com/mints/goldspace/manager/CpdManager.kt
0 → 100644
View file @
994f9525
package
com.mints.goldspace.manager
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.common.DeviceInfo
import
com.mints.goldspace.net.CpdService
import
com.mints.goldspace.utils.MD5
import
com.mints.library.net.netstatus.NetUtils
import
okhttp3.MediaType.Companion.toMediaTypeOrNull
import
okhttp3.RequestBody
import
org.json.JSONException
import
org.json.JSONObject
/**
* 圣于地Cpd下载
*/
object
CpdManager
{
/*单个任务id*/
const
val
BUSINESS_ID
=
"m8909"
const
val
KEY
=
"KVPCQQsS9AV68y9DA2S4gIk2orHY4xz6"
/*列表任务id*/
const
val
BUSINESS_ID_LIST
=
""
const
val
KEY_LIST
=
""
/**
* 单任务url
*/
fun
getCpdUrl
():
String
{
val
currentTimeMillis
=
System
.
currentTimeMillis
().
toString
()
val
token
=
MD5
.
GetMD5Code
(
BUSINESS_ID
+
KEY
+
currentTimeMillis
)
// token=MD5(id + apikey+ timestamp)
return
CpdService
.
CPD_IP
+
"default/?businessId="
+
BUSINESS_ID
+
"&token="
+
token
+
"×tamp="
+
currentTimeMillis
}
/**
* 列表任务url
*/
fun
getCpdLisrUrl
():
String
{
val
currentTimeMillis
=
System
.
currentTimeMillis
().
toString
()
val
token
=
MD5
.
GetMD5Code
(
BUSINESS_ID_LIST
+
KEY_LIST
+
currentTimeMillis
)
// token=MD5(id + apikey+ timestamp)
return
CpdService
.
CPD_IP
+
"list/?businessId="
+
BUSINESS_ID_LIST
+
"&token="
+
token
+
"×tamp="
+
currentTimeMillis
}
/**
* 单任务参数
*/
fun
getCpdBody
(
ip
:
String
):
RequestBody
{
val
deviceInfo
=
DeviceInfo
.
instance
val
param
=
JSONObject
()
val
application
=
JSONObject
()
val
equipment
=
JSONObject
()
try
{
application
.
put
(
"app_pkg_name"
,
Constant
.
MINTS_PKG_NAME
)
application
.
put
(
"app_ver_code"
,
deviceInfo
.
versionCode
)
application
.
put
(
"app_ver_name"
,
deviceInfo
.
versionName
)
// 设备类型 4-手机
equipment
.
put
(
"type"
,
"4"
)
// 系统类型 1:android
equipment
.
put
(
"os_type"
,
"1"
)
equipment
.
put
(
"android_id"
,
deviceInfo
.
androidId
)
equipment
.
put
(
"imei"
,
deviceInfo
.
iMEI
)
equipment
.
put
(
"mac"
,
deviceInfo
.
getMacAddress
())
equipment
.
put
(
"net_type"
,
NetUtils
.
getNetworkStateForCpd
(
MintsApplication
.
getContext
()))
equipment
.
put
(
"ip"
,
ip
)
equipment
.
put
(
"brand"
,
deviceInfo
.
brand
)
equipment
.
put
(
"model"
,
deviceInfo
.
mobileModel
)
param
.
put
(
"application"
,
application
)
param
.
put
(
"equipment"
,
equipment
)
}
catch
(
e
:
JSONException
)
{
e
.
printStackTrace
()
}
return
RequestBody
.
create
(
"application/json"
.
toMediaTypeOrNull
(),
param
.
toString
())
}
/**
* 列表任务参数
*/
fun
getCpdListBody
(
ip
:
String
,
number
:
Int
):
RequestBody
{
val
deviceInfo
=
DeviceInfo
.
instance
val
param
=
JSONObject
()
val
application
=
JSONObject
()
val
equipment
=
JSONObject
()
val
advertising
=
JSONObject
()
try
{
application
.
put
(
"app_pkg_name"
,
Constant
.
MINTS_PKG_NAME
)
application
.
put
(
"app_ver_code"
,
deviceInfo
.
versionCode
)
application
.
put
(
"app_ver_name"
,
deviceInfo
.
versionName
)
// 设备类型 4-手机
equipment
.
put
(
"type"
,
"4"
)
// 系统类型 1:android
equipment
.
put
(
"os_type"
,
"1"
)
equipment
.
put
(
"android_id"
,
deviceInfo
.
androidId
)
equipment
.
put
(
"imei"
,
deviceInfo
.
iMEI
)
equipment
.
put
(
"mac"
,
deviceInfo
.
getMacAddress
())
equipment
.
put
(
"net_type"
,
NetUtils
.
getNetworkStateForCpd
(
MintsApplication
.
getContext
()))
equipment
.
put
(
"ip"
,
ip
)
equipment
.
put
(
"brand"
,
deviceInfo
.
brand
)
equipment
.
put
(
"model"
,
deviceInfo
.
mobileModel
)
equipment
.
put
(
"make"
,
deviceInfo
.
brand
)
advertising
.
put
(
"number"
,
number
)
param
.
put
(
"application"
,
application
)
param
.
put
(
"equipment"
,
equipment
)
param
.
put
(
"advertising"
,
advertising
)
}
catch
(
e
:
JSONException
)
{
e
.
printStackTrace
()
}
return
RequestBody
.
create
(
"application/json"
.
toMediaTypeOrNull
(),
param
.
toString
())
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
0 → 100644
View file @
994f9525
package
com.mints.goldspace.manager
import
android.app.Application
import
com.kwad.sdk.api.KsAdSDK
import
com.kwad.sdk.api.SdkConfig
import
com.mints.goldspace.R
/**
* 描述:快手联盟
* 作者:孟崔广
*/
object
KsManager
{
private
const
val
KS_APP_ID
=
"551900003"
/* splash-postid */
// const val KS_AD_SPLASH_POSTID = 5519000005
/*信息流*/
// val KS_AD_NATIVEEXPRESS_DRAW = 5519000008
const
val
KS_AD_NATIVEEXPRESS_AWARD
=
5519000010
/* vedio-postid */
const
val
KS_AD_VEDIO_POSTID
=
5519000009
/**
* 初始化
*/
fun
initKs
(
application
:
Application
)
{
KsAdSDK
.
init
(
application
,
SdkConfig
.
Builder
()
.
appId
(
KS_APP_ID
)
// 测试aapId,请联系快⼿平台申请正式AppId,必填
.
appName
(
application
.
getString
(
R
.
string
.
app_name
))
// 测试appName,请填写您应⽤的名称,⾮必填
.
showNotification
(
true
)
// 是否展示下载通知栏
.
debug
(
true
)
// 是否开启sdk 调试⽇志 可选
.
build
())
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/manager/TzManager.kt
View file @
994f9525
package
com.mints.goldspace.manager
import
android.app.Application
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.MintsApplication
import
com.mints.library.utils.CommonUtils
import
com.tz.sdk.core.engine.ADEngine
...
...
@@ -13,8 +12,8 @@ import com.tz.sdk.core.engine.IADEngineState
*/
object
TzManager
{
const
val
APP_KEY
=
""
const
val
APP_SECRET
=
""
const
val
APP_KEY
=
"
1218b3b5c900a248f88c5eb24c897700
"
const
val
APP_SECRET
=
"
99984798537a2bd19f9b72b40ddaea71
"
/**
* 初始化
...
...
@@ -25,8 +24,9 @@ object TzManager {
.
appKey
(
APP_KEY
)
.
appSecret
(
APP_SECRET
)
.
appChannel
(
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
))
// .forTest(false)
.
forTest
(
BuildConfig
.
DEBUG
)
.
forTest
(
true
)
.
log
(
true
)
.
verbose
(
true
)
.
build
(),
object
:
IADEngineState
{
override
fun
onIdle
()
{}
...
...
app/src/main/java/com/mints/goldspace/mvp/model/DrawcashBean.java
View file @
994f9525
...
...
@@ -87,6 +87,16 @@ public class DrawcashBean implements Serializable {
private
int
FL_VEDIO
;
private
int
CORAL_VEDIO
;
public
int
getKS_VEDIO
()
{
return
KS_VEDIO
;
}
public
void
setKS_VEDIO
(
int
KS_VEDIO
)
{
this
.
KS_VEDIO
=
KS_VEDIO
;
}
private
int
KS_VEDIO
;
public
int
getCORAL_VEDIO
()
{
return
CORAL_VEDIO
;
}
...
...
app/src/main/java/com/mints/goldspace/mvp/model/FlowAdRulesBean.java
0 → 100644
View file @
994f9525
package
com
.
mints
.
goldspace
.
mvp
.
model
;
import
java.io.Serializable
;
/**
* 用户渠道对应代码位
*/
public
class
FlowAdRulesBean
implements
Serializable
{
private
int
YLH
;
private
int
KS
;
private
int
CSJ
;
public
int
getYLH
()
{
return
YLH
;
}
public
int
getKS
()
{
return
KS
;
}
public
int
getCSJ
()
{
return
CSJ
;
}
}
app/src/main/java/com/mints/goldspace/mvp/model/SydCpdListBean.java
0 → 100644
View file @
994f9525
package
com
.
mints
.
goldspace
.
mvp
.
model
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 圣于地cpd list bean
*/
public
class
SydCpdListBean
implements
Serializable
{
private
int
code
;
private
String
message
;
private
SydCpdListBean
.
DataBean
data
;
public
int
getCode
()
{
return
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
DataBean
getData
()
{
return
data
;
}
public
class
DataBean
implements
Serializable
{
/**
* uuid : 285a96ea-c9a0-41e3-ad4c-ef7d518f982e
* uukey : MTYxMzQ1OTYwNTEzOXw5OTAwMDg2OTA5MTk3MTI=
* offset : [53,44,48]
* materials : [{"app_name":"开言英语先锋版","app_apk_name":"com.openlanguage.easy","app_url":"http://imtt.dd.qq.com/16891/apk/EAC0CC7F622C8BD38DBDA027CE4BA334.apk?fsna","app_ver_name":"1.0.1","app_ver_code":101,"title":null,"icons":"https://pp.myapp.com/ma_icon/0/icon_54084266_1602835589/96","bytes":18296415,"intro":null,"dl_count":null,"star":null,"description":"","md5":"5607420774b61a456ca1fb6dc6fa1bfb","assets":[{"width":null,"height":null,"url":"https://pp.myapp.com/ma_pic2/0/shot_54084266_1_1602835586/550"}],"duration":null,"creative_type":null,"tracker":{"show":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=1&businessId=guest"],"clikc":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=2&businessId=guest& "],"download_start":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=3&businessId=guest"],"download_finish":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=4&businessId=guest "],"install_start":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=5&businessId=guest"],"install_finish":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=6&businessId=guest"],"activation":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=7&businessId=guest"]}}]
*/
private
String
uuid
;
private
String
uukey
;
private
List
<
Integer
>
offset
;
private
List
<
MaterialsBean
>
materials
;
public
String
getUuid
()
{
return
uuid
;
}
public
String
getUukey
()
{
return
uukey
;
}
public
List
<
Integer
>
getOffset
()
{
return
offset
;
}
public
List
<
MaterialsBean
>
getMaterials
()
{
return
materials
;
}
public
class
MaterialsBean
implements
Serializable
{
/**
* app_name : 开言英语先锋版
* app_apk_name : com.openlanguage.easy
* app_url : http://imtt.dd.qq.com/16891/apk/EAC0CC7F622C8BD38DBDA027CE4BA334.apk?fsna
* app_ver_name : 1.0.1
* app_ver_code : 101
* title : null
* icons : https://pp.myapp.com/ma_icon/0/icon_54084266_1602835589/96
* bytes : 18296415
* intro : null
* dl_count : null
* star : null
* description :
* md5 : 5607420774b61a456ca1fb6dc6fa1bfb
* assets : [{"width":null,"height":null,"url":"https://pp.myapp.com/ma_pic2/0/shot_54084266_1_1602835586/550"}]
* duration : null
* creative_type : null
* tracker : {"show":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=1&businessId=guest"],"clikc":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=2&businessId=guest& "],"download_start":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=3&businessId=guest"],"download_finish":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=4&businessId=guest "],"install_start":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=5&businessId=guest"],"install_finish":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=6&businessId=guest"],"activation":["http://api.musesmobi.com:8111/api/cpd/1/report/list?type=7&businessId=guest"]}
*/
private
String
app_name
;
private
String
app_apk_name
;
private
String
app_url
;
private
String
app_ver_name
;
private
Integer
app_ver_code
;
private
Object
title
;
private
String
icons
;
private
Integer
bytes
;
private
Object
intro
;
private
Object
dl_count
;
private
Object
star
;
private
String
description
;
private
String
md5
;
private
List
<
AssetsBean
>
assets
;
private
Object
duration
;
private
Object
creative_type
;
private
TrackerBean
tracker
;
public
String
getApp_name
()
{
return
app_name
;
}
public
String
getApp_apk_name
()
{
return
app_apk_name
;
}
public
String
getApp_url
()
{
return
app_url
;
}
public
String
getApp_ver_name
()
{
return
app_ver_name
;
}
public
Integer
getApp_ver_code
()
{
return
app_ver_code
;
}
public
Object
getTitle
()
{
return
title
;
}
public
String
getIcons
()
{
return
icons
;
}
public
Integer
getBytes
()
{
return
bytes
;
}
public
Object
getIntro
()
{
return
intro
;
}
public
Object
getDl_count
()
{
return
dl_count
;
}
public
Object
getStar
()
{
return
star
;
}
public
String
getDescription
()
{
return
description
;
}
public
String
getMd5
()
{
return
md5
;
}
public
List
<
AssetsBean
>
getAssets
()
{
return
assets
;
}
public
Object
getDuration
()
{
return
duration
;
}
public
Object
getCreative_type
()
{
return
creative_type
;
}
public
TrackerBean
getTracker
()
{
return
tracker
;
}
public
class
TrackerBean
implements
Serializable
{
private
List
<
String
>
show
;
private
List
<
String
>
clikc
;
private
List
<
String
>
download_start
;
private
List
<
String
>
download_finish
;
private
List
<
String
>
install_start
;
private
List
<
String
>
install_finish
;
private
List
<
String
>
activation
;
public
List
<
String
>
getShow
()
{
return
show
;
}
public
List
<
String
>
getClikc
()
{
return
clikc
;
}
public
List
<
String
>
getDownload_start
()
{
return
download_start
;
}
public
List
<
String
>
getDownload_finish
()
{
return
download_finish
;
}
public
List
<
String
>
getInstall_start
()
{
return
install_start
;
}
public
List
<
String
>
getInstall_finish
()
{
return
install_finish
;
}
public
List
<
String
>
getActivation
()
{
return
activation
;
}
}
public
class
AssetsBean
implements
Serializable
{
/**
* width : null
* height : null
* url : https://pp.myapp.com/ma_pic2/0/shot_54084266_1_1602835586/550
*/
private
Object
width
;
private
Object
height
;
private
String
url
;
}
}
}
}
app/src/main/java/com/mints/goldspace/mvp/model/TzTaskBean.java
View file @
994f9525
...
...
@@ -11,6 +11,7 @@ public class TzTaskBean {
private
boolean
isShCpd
;
private
CoralAD
coralAd
;
private
CpdModelBean
.
DataBean
.
MaterialsBean
.
TrackerBean
trackerBean
;
private
SydCpdListBean
.
DataBean
.
MaterialsBean
.
TrackerBean
trackerListBean
;
private
int
coin
;
private
int
state
;
private
String
currentPkgName
;
...
...
@@ -26,7 +27,7 @@ public class TzTaskBean {
private
String
aid
;
public
TzTaskBean
(
String
icon
,
String
title
,
String
description
,
boolean
isShCpd
,
int
coin
,
int
state
,
String
downLoadPkgName
)
{
public
TzTaskBean
(
String
icon
,
String
title
,
String
description
,
boolean
isShCpd
,
int
coin
,
int
state
,
String
downLoadPkgName
)
{
this
.
icon
=
icon
;
this
.
title
=
title
;
this
.
description
=
description
;
...
...
@@ -37,7 +38,7 @@ public class TzTaskBean {
this
.
downLoadPkgName
=
downLoadPkgName
;
}
public
TzTaskBean
(
String
icon
,
String
title
,
int
coin
,
int
state
,
String
currentPkgName
,
String
aid
)
{
public
TzTaskBean
(
String
icon
,
String
title
,
int
coin
,
int
state
,
String
currentPkgName
,
String
aid
)
{
this
.
icon
=
icon
;
this
.
title
=
title
;
this
.
coin
=
coin
;
...
...
@@ -82,6 +83,14 @@ public class TzTaskBean {
this
.
trackerBean
=
trackerBean
;
}
public
SydCpdListBean
.
DataBean
.
MaterialsBean
.
TrackerBean
getTrackerListBean
()
{
return
trackerListBean
;
}
public
void
setTrackerListBean
(
SydCpdListBean
.
DataBean
.
MaterialsBean
.
TrackerBean
trackerListBean
)
{
this
.
trackerListBean
=
trackerListBean
;
}
public
void
setCoralAd
(
CoralAD
coralAd
)
{
this
.
coralAd
=
coralAd
;
}
...
...
@@ -134,19 +143,4 @@ public class TzTaskBean {
this
.
currentPkgName
=
currentPkgName
;
}
@Override
public
String
toString
()
{
return
"TzTaskBean{"
+
"icon='"
+
icon
+
'\''
+
", title='"
+
title
+
'\''
+
", description='"
+
description
+
'\''
+
", app_url='"
+
app_url
+
'\''
+
", isShCpd="
+
isShCpd
+
", coralAd="
+
coralAd
+
", trackerBean="
+
trackerBean
+
", coin="
+
coin
+
", state="
+
state
+
", currentPkgName='"
+
currentPkgName
+
'\''
+
'}'
;
}
}
app/src/main/java/com/mints/goldspace/mvp/model/UserTaskMsgBean.java
View file @
994f9525
package
com
.
mints
.
goldspace
.
mvp
.
model
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
public
class
UserTaskMsgBean
implements
Serializable
{
...
...
@@ -12,6 +11,7 @@ public class UserTaskMsgBean implements Serializable {
private
BlessingBigMsgBean
blessingBigMsg
;
private
UserRiskAppsBean
userRiskApps
;
private
AdcodeBean
adcode_v1
=
null
;
private
FlowAdRulesBean
flowAdRules
;
private
String
ip
;
private
String
channel
;
...
...
@@ -120,4 +120,8 @@ public class UserTaskMsgBean implements Serializable {
public
String
getChannel
()
{
return
channel
;
}
public
FlowAdRulesBean
getFlowAdRules
()
{
return
flowAdRules
;
}
}
app/src/main/java/com/mints/goldspace/mvp/model/VedioRulesBean.java
View file @
994f9525
...
...
@@ -10,6 +10,16 @@ public class VedioRulesBean implements Serializable {
private
FLVedioBean
FL_VEDIO
;
private
CsjfullVedioBean
CSJFULL_VEDIO
;
private
CORALVedioBean
CORAL_VEDIO
;
public
KsVedioBean
getKS_VEDIO
()
{
return
KS_VEDIO
;
}
public
void
setKS_VEDIO
(
KsVedioBean
KS_VEDIO
)
{
this
.
KS_VEDIO
=
KS_VEDIO
;
}
private
KsVedioBean
KS_VEDIO
;
private
boolean
flVideoFlag
;
public
class
CsjVedioBean
implements
Serializable
{
...
...
@@ -91,6 +101,20 @@ public class VedioRulesBean implements Serializable {
}
public
class
KsVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
public
int
getSurplus
()
{
return
surplus
;
}
public
int
getRate
()
{
return
rate
;
}
}
public
FLVedioBean
getFL_VEDIO
()
{
return
FL_VEDIO
;
}
...
...
app/src/main/java/com/mints/goldspace/mvp/presenters/TaskPresenter.kt
View file @
994f9525
...
...
@@ -6,9 +6,11 @@ import com.google.gson.JsonObject
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.common.DeviceInfo
import
com.mints.goldspace.manager.AppHttpManager
import
com.mints.goldspace.manager.CpdManager
import
com.mints.goldspace.manager.CpdSydManager
import
com.mints.goldspace.mvp.model.BaseResponse
import
com.mints.goldspace.mvp.model.CpdModelBean
import
com.mints.goldspace.mvp.model.SydCpdListBean
import
com.mints.goldspace.mvp.views.TaskView
import
com.mints.goldspace.net.CpdService
import
com.mints.goldspace.utils.LogUtil
...
...
@@ -17,7 +19,6 @@ import com.mints.library.net.neterror.Throwable
import
com.mints.library.utils.json.JsonUtil
class
TaskPresenter
:
BasePresenter
<
TaskView
>()
{
fun
getShCpdTime
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"isAndroid10"
]
=
TextUtils
.
isEmpty
(
DeviceInfo
.
instance
.
iMEI
)
...
...
@@ -38,13 +39,17 @@ class TaskPresenter : BasePresenter<TaskView>() {
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
val
data
=
baseResponse
.
data
when
(
code
)
{
200
->
{
if
(
data
!=
null
)
{
view
.
getShCpdTimeSuc
(
data
.
get
(
"needSeconds"
).
asInt
,
data
.
get
(
"coin"
).
asInt
,
data
.
get
(
"CPD"
).
asInt
,
data
.
get
(
"CPD_SYD"
).
asInt
)
view
.
getShCpdTimeSuc
(
data
.
get
(
"needSeconds"
).
asInt
,
data
.
get
(
"coin"
).
asInt
,
data
.
get
(
"CPD"
).
asInt
,
data
.
get
(
"CPD_SYD"
).
asInt
,
data
.
get
(
"cpdOrder"
).
asString
)
}
}
}
...
...
@@ -55,7 +60,7 @@ class TaskPresenter : BasePresenter<TaskView>() {
fun
cmtImp
(
url
:
String
)
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
CpdService
.
Factory
.
getInstance
().
cmtImp
(
url
),
object
:
BaseSubscriber
<
Any
>()
{
object
:
BaseSubscriber
<
JsonObject
>()
{
override
fun
onCompleted
()
{
}
...
...
@@ -64,7 +69,7 @@ class TaskPresenter : BasePresenter<TaskView>() {
LogUtil
.
d
(
"TaskPresenter"
,
"onError->${e.printStackTrace()}"
)
}
override
fun
onNext
(
baseResponse
:
Any
)
{
override
fun
onNext
(
baseResponse
:
JsonObject
)
{
if
(
isLinkView
)
return
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
"TaskPresenter"
,
"onNext->${url} JsonUtil:${JsonUtil.toJson(baseResponse)}"
)
...
...
@@ -76,7 +81,7 @@ class TaskPresenter : BasePresenter<TaskView>() {
fun
getCpdDetail
(
ip
:
String
)
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
CpdService
.
Factory
.
getInstance
().
getAdVedio
(
Cpd
SydManager
.
getCpdUrl
(),
CpdSy
dManager
.
getCpdBody
(
ip
)),
.
call
(
CpdService
.
Factory
.
getInstance
().
getAdVedio
(
Cpd
Manager
.
getCpdUrl
(),
Cp
dManager
.
getCpdBody
(
ip
)),
object
:
BaseSubscriber
<
JsonObject
>()
{
override
fun
onCompleted
()
{
}
...
...
@@ -104,4 +109,33 @@ class TaskPresenter : BasePresenter<TaskView>() {
})
}
fun
getCpdListDetail
(
ip
:
String
,
number
:
Int
)
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
CpdService
.
Factory
.
getInstance
().
getAdVedio
(
CpdManager
.
getCpdLisrUrl
(),
CpdManager
.
getCpdListBody
(
ip
,
number
)),
object
:
BaseSubscriber
<
JsonObject
>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
view
.
getCpdModelFail
()
}
override
fun
onNext
(
t
:
JsonObject
?)
{
if
(
isLinkView
)
return
val
gson
=
Gson
()
val
response
=
gson
.
fromJson
<
SydCpdListBean
>(
t
.
toString
(),
SydCpdListBean
::
class
.
java
)
if
(
response
.
code
==
0
)
{
val
data
=
response
.
data
if
(
data
!=
null
)
{
view
.
getCpdListModelSuc
(
data
)
}
else
{
view
.
getCpdModelFail
()
}
}
else
{
view
.
getCpdModelFail
()
}
}
})
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/mvp/views/TaskView.kt
View file @
994f9525
package
com.mints.goldspace.mvp.views
import
com.mints.goldspace.mvp.model.CpdModelBean
import
com.mints.goldspace.mvp.model.SydCpdListBean
interface
TaskView
:
BaseView
{
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
,
CPD_ORDER
:
String
?
)
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
fun
getCpdListModelSuc
(
dataBean
:
SydCpdListBean
.
DataBean
)
fun
getCpdModelFail
()
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/net/CpdService.java
View file @
994f9525
...
...
@@ -26,7 +26,7 @@ import rx.Observable;
*/
public
interface
CpdService
{
String
CPD_IP
=
"http://api.musesmobi.com:8111/api/cpd/1/detail/
default/
"
;
String
CPD_IP
=
"http://api.musesmobi.com:8111/api/cpd/1/detail/"
;
/**
* 请求广告
...
...
app/src/main/java/com/mints/goldspace/ui/activitys/DrawcashActivity.kt
View file @
994f9525
...
...
@@ -303,13 +303,16 @@ class DrawcashActivity : BaseActivity(),
data
.
sdhZ_VEDIO
,
data
.
fL_VEDIO
,
data
.
coraL_VEDIO
,
data
.
csjfulL_VEDIO
)
data
.
csjfulL_VEDIO
,
data
.
kS_VEDIO
)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} "
+
"ylhWeight:${data.ylH_VEDIO} "
+
"sdhzWeight:${data.sdhZ_VEDIO} "
+
"csjFullWeight:${data.csjfulL_VEDIO} "
+
"shWeight:${data.coraL_VEDIO} "
+
"flWeight:${data.fL_VEDIO}"
)
"flWeight:${data.fL_VEDIO} "
+
"ksWeight:${data.kS_VEDIO} "
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
10
AppConfig
.
ylhAdCount
=
10
...
...
@@ -317,6 +320,7 @@ class DrawcashActivity : BaseActivity(),
AppConfig
.
flVideoAdCount
=
10
AppConfig
.
shVideoAdCount
=
10
AppConfig
.
csjFullVedioAdCount
=
10
AppConfig
.
ksVideoAdCount
=
10
}
/**
...
...
app/src/main/java/com/mints/goldspace/ui/activitys/TaskCpdActivity.kt
View file @
994f9525
...
...
@@ -7,11 +7,11 @@ import com.mints.goldspace.R
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.ui.activitys.base.BaseActivity
import
com.mints.goldspace.ui.adapter.MessageFragAdapter
import
com.mints.goldspace.ui.fragment.TaskCpdFragment
import
com.mints.goldspace.ui.fragment.TaskCpdHistoryFragment
import
com.mints.goldspace.ui.widgets.CustomDialogAsApple
import
com.mints.goldspace.ui.widgets.DialogListener
import
com.mints.goldspace.utils.CacheUtil
import
com.mints.goldspace.ui.fragment.TaskCpdFragment
import
kotlinx.android.synthetic.main.activity_task_cpd.*
import
kotlinx.android.synthetic.main.header_layout.*
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
View file @
994f9525
...
...
@@ -20,6 +20,7 @@ import com.mints.goldspace.ad.video.VideoAdingManager
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.manager.*
import
com.mints.goldspace.mvp.model.FlowAdRulesBean
import
com.mints.goldspace.mvp.model.MainVideoMsgBean
import
com.mints.goldspace.mvp.model.UserTaskMsgBean
import
com.mints.goldspace.mvp.presenters.HomePresenter
...
...
@@ -236,6 +237,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 设置视频权重
initAdWeight
(
data
)
initExpress
(
data
.
flowAdRules
)
// 调用金币视频信息接口
homePresenter
.
getHomeVedioMsg
()
...
...
@@ -578,13 +581,15 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
)
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate} "
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
...
...
@@ -592,12 +597,18 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
csjFullVedioAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVedioAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount}"
)
"flCount:${AppConfig.flVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount} "
)
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
}
/**
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
View file @
994f9525
...
...
@@ -15,6 +15,7 @@ import com.fly.scenemodule.SceneUtil
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.R
import
com.mints.goldspace.ad.banner.BannerManager
import
com.mints.goldspace.ad.express.PreLoadExpressManager
import
com.mints.goldspace.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goldspace.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goldspace.ad.video.VideoAdingManager
...
...
@@ -254,6 +255,9 @@ class MyFragment : BaseFragment(),
// 更新权重
initAdWeight
(
data
)
initExpress
(
data
.
flowAdRules
)
AppConfig
.
app_black_name
=
data
.
userRiskApps
.
userRiskAppName
AppConfig
.
app_black_pkg
=
data
.
userRiskApps
.
userRiskAppPkg
AppConfig
.
flVideoFlag
=
data
.
vedioRules
.
isFlVideoFlag
...
...
@@ -510,7 +514,7 @@ class MyFragment : BaseFragment(),
// if (TextUtils.isEmpty(mCurrentPkg)) {
if
(
mCurrentPkg
==
null
)
{
showToast
(
"任务异常,请重试~"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
AppConfig
.
isHighTask
=
false
}
else
{
...
...
@@ -520,7 +524,7 @@ class MyFragment : BaseFragment(),
AppConfig
.
isHighTask
=
true
}
else
{
showToast
(
"未找到当前APP、可能被卸载,请重试~"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
AppConfig
.
isHighTask
=
false
}
...
...
@@ -1095,12 +1099,14 @@ class MyFragment : BaseFragment(),
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
)
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
...
...
@@ -1114,9 +1120,14 @@ class MyFragment : BaseFragment(),
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVedioAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount}"
)
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
}
/**
* 跳转QQ群弹框
*/
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/TaskCpdFragment.kt
View file @
994f9525
This diff is collapsed.
Click to expand it.
app/src/main/res/drawable/native_item_btn_bg.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"#168FFF"
/>
<corners
android:radius=
"4dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/native_item_app_download.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tool=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"36dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
tool:ignore=
"SpUsage,ContentDescription"
>
<ImageView
android:id=
"@+id/app_icon"
android:layout_width=
"36dp"
android:layout_height=
"36dp"
android:src=
"@mipmap/test_app_default_icon"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"8dp"
android:layout_marginRight=
"16dp"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
tool:ignore=
"RtlHardcoded"
>
<TextView
android:id=
"@+id/app_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:includeFontPadding=
"false"
android:maxLines=
"1"
android:textColor=
"#222222"
android:textSize=
"14dp"
tool:text=
"快手APP"
/>
<TextView
android:id=
"@+id/app_desc"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:ellipsize=
"end"
android:includeFontPadding=
"false"
android:maxLines=
"1"
android:textColor=
"#9C9C9C"
android:textSize=
"11dp"
tool:text=
"记录美好生活"
/>
</LinearLayout>
<TextView
android:id=
"@+id/app_download_btn"
android:layout_width=
"64dp"
android:layout_height=
"24dp"
android:background=
"@drawable/native_item_btn_bg"
android:gravity=
"center"
android:textColor=
"#168FFF"
android:textSize=
"11dp"
tool:text=
"立即下载"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/native_item_group_image.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
tools:ignore=
"ContentDescription,SpUsage,RtlHardcoded"
>
<TextView
android:id=
"@+id/ad_desc"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"2"
android:textColor=
"#020202"
android:textSize=
"18dp"
tools:text=
"快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"200dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
>
<ImageView
android:id=
"@+id/ad_image_left"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:scaleType=
"centerCrop"
/>
<ImageView
android:id=
"@+id/ad_image_mid"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
android:layout_marginLeft=
"4dp"
android:layout_marginRight=
"4dp"
android:layout_weight=
"1"
android:scaleType=
"centerCrop"
/>
<ImageView
android:id=
"@+id/ad_image_right"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:scaleType=
"centerCrop"
/>
</LinearLayout>
<include
android:id=
"@+id/ad_download_container"
layout=
"@layout/native_item_app_download"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<include
android:id=
"@+id/ad_h5_container"
layout=
"@layout/native_item_h5_open"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:layout_marginTop=
"4dp"
tools:ignore=
"ContentDescription,RtlHardcoded"
>
<ImageView
android:layout_width=
"35dp"
android:layout_height=
"12dp"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/test_ad_label_gray"
/>
<ImageView
android:id=
"@+id/ad_dislike"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/test_dislike_gray"
/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/native_item_h5_open.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tool=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
tool:ignore=
"SpUsage,RtlHardcoded"
>
<TextView
android:id=
"@+id/h5_desc"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginRight=
"16dp"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:gravity=
"center|left"
android:includeFontPadding=
"false"
android:maxLines=
"1"
android:textColor=
"#9C9C9C"
android:textSize=
"11dp"
tool:text=
"快手广告快手广告快手广告快手广告快手广告快手广告"
/>
<TextView
android:id=
"@+id/h5_open_btn"
android:layout_width=
"64dp"
android:layout_height=
"24dp"
android:background=
"@drawable/native_item_btn_bg"
android:gravity=
"center"
android:textColor=
"#168FFF"
android:textSize=
"11dp"
tool:text=
"查看详情"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/native_item_normal.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:ignore=
"HardcodedText"
>
<TextView
android:id=
"@+id/tv"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_margin=
"16dp"
android:gravity=
"center"
android:text=
"普通的view"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/native_item_single_image.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
tools:ignore=
"ContentDescription,SpUsage,RtlHardcoded"
>
<TextView
android:id=
"@+id/ad_desc"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"2"
android:textColor=
"#020202"
android:textSize=
"18dp"
tools:text=
"快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告"
/>
<ImageView
android:id=
"@+id/ad_image"
android:layout_width=
"match_parent"
android:layout_height=
"200dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
android:scaleType=
"centerCrop"
/>
<include
android:id=
"@+id/ad_download_container"
layout=
"@layout/native_item_app_download"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<include
android:id=
"@+id/ad_h5_container"
layout=
"@layout/native_item_h5_open"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:layout_marginTop=
"4dp"
tools:ignore=
"ContentDescription,RtlHardcoded"
>
<ImageView
android:layout_width=
"35dp"
android:layout_height=
"12dp"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/test_ad_label_gray"
/>
<ImageView
android:id=
"@+id/ad_dislike"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/test_dislike_gray"
/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/native_item_video.xml
0 → 100644
View file @
994f9525
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/ad_score_color"
android:orientation=
"vertical"
tools:ignore=
"ContentDescription,SpUsage,RtlHardcoded"
>
<TextView
android:id=
"@+id/ad_desc"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"2"
android:textColor=
"#020202"
android:textSize=
"18dp"
tools:text=
"快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告"
/>
<FrameLayout
android:id=
"@+id/video_container"
android:layout_width=
"match_parent"
android:layout_height=
"200dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
/>
<include
android:id=
"@+id/ad_download_container"
layout=
"@layout/native_item_app_download"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<include
android:id=
"@+id/ad_h5_container"
layout=
"@layout/native_item_h5_open"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:layout_marginTop=
"4dp"
tools:ignore=
"ContentDescription,RtlHardcoded"
>
<ImageView
android:layout_width=
"35dp"
android:layout_height=
"12dp"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/test_ad_label_gray"
/>
<ImageView
android:id=
"@+id/ad_dislike"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/test_dislike_gray"
/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/test_ad_label_gray.png
0 → 100755
View file @
994f9525
11.1 KB
app/src/main/res/mipmap-xxhdpi/test_app_default_icon.png
0 → 100755
View file @
994f9525
3.21 KB
app/src/main/res/mipmap-xxhdpi/test_dislike_gray.png
0 → 100755
View file @
994f9525
1.7 KB
local.properties
View file @
994f9525
...
...
@@ -4,8 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sat Feb 06 15:44:58 CST 2021
#sdk.dir=/Users/Hello/Library/Android/sdk
sdk.dir
=
/Users/mcg/Library/Android/sdk
#Mon Mar 08 10:52:55 CST 2021
sdk.dir
=
/Users/Hello/Library/Android/sdk
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