Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
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
Commits
a59bdf71
Commit
a59bdf71
authored
Jun 02, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加domob vedio
parent
a57db8f6
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
358 additions
and
70 deletions
+358
-70
build.gradle
highgold/app/build.gradle
+4
-0
domob_rvads_1.0.0.aar
highgold/app/libs/domob_rvads_1.0.0.aar
+0
-0
AndroidManifest.xml
highgold/app/src/main/AndroidManifest.xml
+5
-0
DomobVedioAdManager.kt
...rc/main/java/com/mints/highgold/ad/DomobVedioAdManager.kt
+162
-2
VedioAdingManager.java
...rc/main/java/com/mints/highgold/ad/VedioAdingManager.java
+71
-29
AppConfig.java
...pp/src/main/java/com/mints/highgold/common/AppConfig.java
+0
-10
Constant.java
...app/src/main/java/com/mints/highgold/common/Constant.java
+1
-1
DomobManager.kt
.../src/main/java/com/mints/highgold/manager/DomobManager.kt
+13
-0
UserTaskMsgBean.java
...in/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
+18
-0
DomobVedioAdPresenter.kt
...om/mints/highgold/mvp/presenters/DomobVedioAdPresenter.kt
+39
-0
DomobVedioAdView.kt
...ain/java/com/mints/highgold/mvp/views/DomobVedioAdView.kt
+4
-0
AwardActivity.java
...n/java/com/mints/highgold/ui/activitys/AwardActivity.java
+0
-6
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+34
-21
VersusFragment.java
...n/java/com/mints/highgold/ui/fragment/VersusFragment.java
+4
-1
build.gradle
highgold/build.gradle
+3
-0
No files found.
highgold/app/build.gradle
View file @
a59bdf71
...
...
@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
//apply plugin: 'com.tendcloud.codelessplugin'
apply
plugin:
'com.google.protobuf'
android
{
compileSdkVersion
rootProject
.
ext
.
androidCompileSdkVersion
...
...
@@ -299,6 +300,9 @@ dependencies {
implementation
(
name:
'shanhuAD-1.0.14'
,
ext:
'aar'
)
// 创神广告
implementation
(
name:
'ad_support_library_v2.1.4'
,
ext:
'aar'
)
// 多盟
implementation
(
name:
'domob_rvads_1.0.0'
,
ext:
'aar'
)
implementation
'com.google.protobuf:protobuf-lite:3.0.0'
testImplementation
'junit:junit:4.12'
...
...
highgold/app/libs/domob_rvads_1.0.0.aar
0 → 100644
View file @
a59bdf71
File added
highgold/app/src/main/AndroidManifest.xml
View file @
a59bdf71
...
...
@@ -176,6 +176,11 @@
<data
android:scheme=
"tencent1109991028"
/>
</intent-filter>
</activity>
<!-- 多盟 -->
<activity
android:name=
"com.dm.rvads.activity.DMPortraitADActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".wxapi.WXEntryActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
...
...
highgold/app/src/main/java/com/mints/highgold/ad/DomobVedioAdManager.kt
View file @
a59bdf71
package
com.mints.highgold.ad
import
android.app.Activity
import
com.dm.rvads.common.util.AdError
import
com.dm.rvads.rewardvideo.RewardVideoADListener
import
com.dm.rvads.rewardvideo.RewardVideoAd
import
com.mints.highgold.MintsApplication
import
com.mints.highgold.mvp.views.ShanhuVedioAdManagerView
import
com.mints.highgold.common.Constant
import
com.mints.highgold.manager.DomobManager
import
com.mints.highgold.mvp.presenters.DomobVedioAdPresenter
import
com.mints.highgold.mvp.views.DomobVedioAdView
import
com.mints.highgold.utils.LogUtil
import
java.util.*
/**
* 多盟视频
*/
class
DomobVedioAdManager
private
constructor
(
activity
:
Activity
)
:
ShanhuVedioAdManagerView
{
class
DomobVedioAdManager
private
constructor
(
activity
:
Activity
)
:
DomobVedioAdView
,
RewardVideoADListener
{
private
val
TAG
=
DomobVedioAdManager
::
class
.
java
.
simpleName
lateinit
var
rewardVideoAd
:
RewardVideoAd
lateinit
var
domobVedioAdPresenter
:
DomobVedioAdPresenter
private
var
domobVedioAdListener
:
DomobVedioAdListener
?
=
null
var
activity
:
Activity
?
=
null
...
...
@@ -19,6 +31,8 @@ class DomobVedioAdManager private constructor(activity: Activity) : ShanhuVedioA
private
var
downloadCoin
=
10
private
var
carrierType
=
""
private
var
isClickScreen
:
Boolean
=
true
companion
object
{
private
var
_inst
:
DomobVedioAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
DomobVedioAdManager
?
{
...
...
@@ -37,14 +51,85 @@ class DomobVedioAdManager private constructor(activity: Activity) : ShanhuVedioA
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
domobVedioAdPresenter
=
DomobVedioAdPresenter
()
domobVedioAdPresenter
.
attachView
(
this
)
}
fun
loadDomobAd
(
downloadCoin
:
Int
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
if
(
activity
==
null
)
{
return
}
isClickScreen
=
true
this
.
downloadCoin
=
downloadCoin
this
.
carrierType
=
carrierType
this
.
curCoin
=
curCoin
this
.
extraId
=
extraId
var
postId
:
String
when
(
carrierType
)
{
Constant
.
CARRIER_DAILY_VIDEO
->
postId
=
DomobManager
.
DOMOB_AD_VEDIO_MAIN_LOOK
Constant
.
CARRIER_VERSUS_VIDEO
->
postId
=
DomobManager
.
DOMOB_AD_VEDIO_VERSUS_LOOK
Constant
.
CARRIER_ONLINE_INCOME_DOUBLE
,
Constant
.
CARRIER_HOMEWATER_BUBBLE
->
postId
=
DomobManager
.
DOMOB_AD_VEDIO_MAIN_POP
Constant
.
CARRIER_REDENVELOPE_DOUBLE
,
Constant
.
CARRIER_REDENVELOPE
->
postId
=
DomobManager
.
DOMOB_AD_VEDIO_REDBOX
else
->
postId
=
DomobManager
.
DOMOB_AD_VEDIO_MAIN_LOOK
}
rewardVideoAd
=
RewardVideoAd
(
activity
,
DomobManager
.
DOMOB_AD_APPID
,
postId
,
this
)
rewardVideoAd
.
loadAD
()
}
override
fun
onADClick
()
{
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_DUOMENT, Constant.EVENT_TYPE_TWO, "", "")
//
// if (isClickScreen) {
// // 防止重复
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_DUOMENT, Constant.EVENT_TYPE_FOUR, "", "")
// isClickScreen = false
// }
if
(
domobVedioAdListener
!=
null
)
{
domobVedioAdListener
?.
domobVedioAdDownload
()
}
}
override
fun
onVideoCached
()
{
rewardVideoAd
.
showAd
()
LogUtil
.
d
(
TAG
,
"onVideoCached"
)
}
override
fun
onReward
()
{
LogUtil
.
d
(
TAG
,
"onReward"
)
}
override
fun
onADClose
()
{
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_DUOMENT, Constant.EVENT_TYPE_THREE, "", "")
if
(
domobVedioAdListener
!=
null
)
{
domobVedioAdListener
?.
domobVedioAdSuccess
()
}
// domobVedioAdPresenter?.reportAddCoinMsg(activity, getAdMapVO())
LogUtil
.
d
(
TAG
,
"onADClose"
)
}
override
fun
onVideoComplete
()
{
LogUtil
.
d
(
TAG
,
"onVideoComplete"
)
}
override
fun
onError
(
error
:
AdError
?)
{
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CHUANGSHEN, Constant.EVENT_TYPE_ONE, (error?.errorCode).toString(), error?.errorMsg)
if
(
domobVedioAdListener
!=
null
)
{
domobVedioAdListener
?.
domobVedioAdFail
()
}
LogUtil
.
d
(
TAG
,
"onError code:${error?.errorCode} msg:${error?.errorMsg}"
)
}
override
fun
onADShow
()
{
LogUtil
.
d
(
TAG
,
"onADShow"
)
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_DUOMENT, Constant.EVENT_TYPE_ZERO, "", "")
}
fun
setDomobVedioAdListener
(
domobVedioAdListener
:
DomobVedioAdListener
?)
{
...
...
@@ -70,4 +155,79 @@ class DomobVedioAdManager private constructor(activity: Activity) : ShanhuVedioA
}
override
fun
getBaseApplication
()
=
activity
?.
application
as
MintsApplication
private
fun
getAdMapVO
():
HashMap
<
String
,
Any
>
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
vo
[
"adtype"
]
=
Constant
.
ADTYPE_VEDIO
vo
[
"adsource"
]
=
Constant
.
AD_SOURCE_DOMOB
when
(
carrierType
)
{
Constant
.
CARRIER_VERSUS_VIDEO
->
vo
[
"coin"
]
=
curCoin
Constant
.
CARRIER_DAILY_DOWNLOAD
->
vo
[
"coin"
]
=
curCoin
Constant
.
CARRIER_DAILY_VIDEO
->
vo
[
"coin"
]
=
curCoin
Constant
.
CARRIER_HOMEWATER_BUBBLE
->
vo
[
"waterCoin"
]
=
curCoin
Constant
.
CARRIER_ONLINE_INCOME_DOUBLE
->
vo
[
"online_income"
]
=
curCoin
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
vo
[
"offline_income"
]
=
curCoin
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_ONE
}
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_ONE
}
Constant
.
CARRIER_DRINK
,
Constant
.
CARRIER_DRINK_PATCH
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
vo
[
"block"
]
=
Constant
.
BLOCK_FOUR
vo
[
"order"
]
=
Constant
.
ORDER_ONE
vo
[
"critId"
]
=
extraId
!!
}
Constant
.
CARRIER_VERSUS_DRINKTEA
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_THREE
vo
[
"critId"
]
=
extraId
!!
}
Constant
.
CARRIER_DAILY_TURN
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
vo
[
"block"
]
=
Constant
.
BLOCK_THREE
vo
[
"order"
]
=
Constant
.
ORDER_THREE
vo
[
"turntableKey"
]
=
extraId
!!
}
Constant
.
CARRIER_CHALLENGE_TURN
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_FOUR
vo
[
"turntableKey"
]
=
extraId
!!
}
Constant
.
CARRIER_CHALLENGE_CARD
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_FIVE
vo
[
"turntableKey"
]
=
extraId
!!
}
Constant
.
CARRIER_REDENVELOPE_DOUBLE
,
Constant
.
CARRIER_REDENVELOPE
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_ONE
vo
[
"numKey"
]
=
extraId
!!
}
else
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
if
(
curCoin
!=
-
1
)
{
vo
[
"online_income"
]
=
curCoin
}
}
}
return
vo
}
fun
destory
()
{
domobVedioAdPresenter
?.
let
{
domobVedioAdPresenter
.
dispose
()
domobVedioAdPresenter
.
detachView
()
}
}
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/ad/VedioAdingManager.java
View file @
a59bdf71
This diff is collapsed.
Click to expand it.
highgold/app/src/main/java/com/mints/highgold/common/AppConfig.java
View file @
a59bdf71
...
...
@@ -33,16 +33,6 @@ public class AppConfig {
*/
public
static
boolean
mainWaterviewStatus
=
false
;
/**
* 上一个播放的广告类型
*/
public
static
String
preAdType
=
""
;
/**
* 上一个播放的广告时间
*/
public
static
long
preAdTime
=
0
;
/**
* ylh 剩余广告播放数
*/
...
...
highgold/app/src/main/java/com/mints/highgold/common/Constant.java
View file @
a59bdf71
...
...
@@ -193,7 +193,7 @@ public interface Constant {
String
AD_SOURCE_HYTECH
=
"HYTECH"
;
//东方网
String
AD_SOURCE_SHANHU
=
"CORAL"
;
//珊瑚
String
AD_SOURCE_CHUANGSHEN
=
"CHUANGSHEN"
;
//创神
String
AD_SOURCE_D
UOMENT
=
"DUOMENT
"
;
//多盟
String
AD_SOURCE_D
OMOB
=
"DOMOB
"
;
//多盟
// 页面
int
PAGE_ONE
=
1
;
...
...
highgold/app/src/main/java/com/mints/highgold/manager/DomobManager.kt
0 → 100644
View file @
a59bdf71
package
com.mints.highgold.manager
/**
* 多盟
*/
object
DomobManager
{
const
val
DOMOB_AD_APPID
=
"96AgVZwg0XNR8oOBqU"
const
val
DOMOB_AD_VEDIO_MAIN_LOOK
=
"A0104601332"
//首页看视频
const
val
DOMOB_AD_VEDIO_REDBOX
=
"A0204601331"
//抢红包
const
val
DOMOB_AD_VEDIO_VERSUS_LOOK
=
"A0304601330"
//任务赚看视频
const
val
DOMOB_AD_VEDIO_MAIN_POP
=
"A1104601329"
//汽泡
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
View file @
a59bdf71
...
...
@@ -74,6 +74,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_mintegral_vedio_rate
;
private
int
vedioplan_coral_vedio_rate
;
private
int
vedioplan_chuangshen_vedio_rate
;
private
int
vedioplan_domob_vedio_rate
;
private
int
vedioplan_csj_vedio_surplus
;
private
int
vedioplan_liyan_vedio_surplus
;
...
...
@@ -83,6 +84,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_mintegral_vedio_surplus
;
private
int
vedioplan_coral_vedio_surplus
;
private
int
vedioplan_chuangshen_vedio_surplus
;
private
int
vedioplan_domob_vedio_surplus
;
public
int
getVedioplan_hytech_vedio_rate
()
{
return
vedioplan_hytech_vedio_rate
;
...
...
@@ -428,4 +430,20 @@ public class UserTaskMsgBean implements Serializable {
public
void
setVedioplan_chuangshen_vedio_surplus
(
int
vedioplan_chuangshen_vedio_surplus
)
{
this
.
vedioplan_chuangshen_vedio_surplus
=
vedioplan_chuangshen_vedio_surplus
;
}
public
int
getVedioplan_domob_vedio_rate
()
{
return
vedioplan_domob_vedio_rate
;
}
public
void
setVedioplan_domob_vedio_rate
(
int
vedioplan_domob_vedio_rate
)
{
this
.
vedioplan_domob_vedio_rate
=
vedioplan_domob_vedio_rate
;
}
public
int
getVedioplan_domob_vedio_surplus
()
{
return
vedioplan_domob_vedio_surplus
;
}
public
void
setVedioplan_domob_vedio_surplus
(
int
vedioplan_domob_vedio_surplus
)
{
this
.
vedioplan_domob_vedio_surplus
=
vedioplan_domob_vedio_surplus
;
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/DomobVedioAdPresenter.kt
0 → 100644
View file @
a59bdf71
package
com.mints.highgold.mvp.presenters
import
android.app.Activity
import
com.mints.highgold.MintsApplication
import
com.mints.highgold.mvp.model.BaseResponse
import
com.mints.highgold.mvp.views.DomobVedioAdView
import
com.mints.highgold.net.LoanService
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
rx.Subscription
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
class
DomobVedioAdPresenter
:
BasePresenter
<
DomobVedioAdView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
loanApplication
=
activity
.
application
as
MintsApplication
loanService
=
loanApplication
.
getLoanService
()
subscription
=
loanService
.
reportAddCoinMsg
(
vo
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
loanApplication
.
defaultSubscribeScheduler
())
.
subscribe
(
object
:
BaseSubscriber
<
BaseResponse
<
Any
?>?>()
{
override
fun
onCompleted
()
{}
override
fun
onError
(
e
:
Throwable
)
{
}
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
?
>)
{}
})
}
fun
dispose
()
{
loanService
=
null
loanApplication
=
null
if
(
subscription
!=
null
&&
!
subscription
.
isUnsubscribed
())
{
subscription
.
unsubscribe
()
}
}
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/mvp/views/DomobVedioAdView.kt
0 → 100644
View file @
a59bdf71
package
com.mints.highgold.mvp.views
interface
DomobVedioAdView
:
BaseView
{
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/ui/activitys/AwardActivity.java
View file @
a59bdf71
...
...
@@ -794,8 +794,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
//广告展示检查3:展示广告前判断广告数据未过期
if
(
SystemClock
.
elapsedRealtime
()
<
(
rewardVideoAD
.
getExpireTimestamp
()
-
delta
))
{
AppConfig
.
ylhAdCount
--;
AppConfig
.
preAdType
=
Constant
.
YLH_VEDIO_AD
;
AppConfig
.
preAdTime
=
Calendar
.
getInstance
().
getTimeInMillis
();
rewardVideoAD
.
showAD
();
}
else
{
...
...
@@ -985,8 +983,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
@Override
public
void
onAdShow
()
{
//视频广告展示回调
AppConfig
.
csjVedioAdCount
--;
AppConfig
.
preAdType
=
Constant
.
CSJ_VEDIO_AD
;
AppConfig
.
preAdTime
=
Calendar
.
getInstance
().
getTimeInMillis
();
isloadTTVedio
=
true
;
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
);
...
...
@@ -1113,8 +1109,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
hideLoading
();
AppConfig
.
csjFullAdCount
--;
AppConfig
.
preAdType
=
Constant
.
CSJ_FULL_AD
;
AppConfig
.
preAdTime
=
Calendar
.
getInstance
().
getTimeInMillis
();
}
@Override
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
a59bdf71
...
...
@@ -26,6 +26,7 @@ import com.google.gson.JsonObject;
import
com.google.gson.JsonParser
;
import
com.mints.highgold.BuildConfig
;
import
com.mints.highgold.R
;
import
com.mints.highgold.ad.DomobVedioAdManager
;
import
com.mints.highgold.ad.VedioAdingManager
;
import
com.mints.highgold.ad.inscreenvedio.MintegralInscreenVedioAdManager
;
import
com.mints.highgold.common.AppConfig
;
...
...
@@ -356,9 +357,7 @@ public class MainFragment extends BaseFragment
Bundle
bundle
;
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_fragment_main_whatgold
:
// 如何赚金币
// readyGo(ReadActivity.class);
readyGo
(
WhatGoldActivity
.
class
);
// DomobVedioAdManager.Companion.getInstance(getActivity()).loadDomobAd(10,20,"main","abc");
break
;
case
R
.
id
.
rl_fragment_main_redbox
:
// 红包
readyGo
(
RedboxActivity
.
class
);
...
...
@@ -475,27 +474,34 @@ public class MainFragment extends BaseFragment
//测试数据
// data.setVedioplan_csj_vedio_rate(0);
// data.setVedioplan_lyh_vedio_rate(0);
// data.setVedioplan_csj_full_screen_video_rate(0);
// data.setVedioplan_hytech_vedio_rate(0);
// data.setVedioplan_mintegral_vedio_rate(0);
// data.setVedioplan_coral_vedio_rate(0);
// data.setVedioplan_chuangshen_vedio_rate(10);
//
// data.setVedioplan_csj_vedio_surplus(0);
// data.setVedioplan_lyh_vedio_surplus(0);
// data.setVedioplan_csj_full_screen_video_surplus(0);
// data.setVedioplan_hytech_vedio_surplus(0);
// data.setVedioplan_mintegral_vedio_surplus(0);
// data.setVedioplan_coral_vedio_surplus(0);
// data.setVedioplan_chuangshen_vedio_surplus(10);
data
.
setVedioplan_csj_vedio_rate
(
0
);
data
.
setVedioplan_lyh_vedio_rate
(
0
);
data
.
setVedioplan_csj_full_screen_video_rate
(
0
);
data
.
setVedioplan_hytech_vedio_rate
(
0
);
data
.
setVedioplan_mintegral_vedio_rate
(
0
);
data
.
setVedioplan_coral_vedio_rate
(
0
);
data
.
setVedioplan_domob_vedio_rate
(
10
);
data
.
setVedioplan_chuangshen_vedio_rate
(
0
);
data
.
setVedioplan_csj_vedio_surplus
(
0
);
data
.
setVedioplan_lyh_vedio_surplus
(
0
);
data
.
setVedioplan_csj_full_screen_video_surplus
(
0
);
data
.
setVedioplan_hytech_vedio_surplus
(
0
);
data
.
setVedioplan_mintegral_vedio_surplus
(
0
);
data
.
setVedioplan_coral_vedio_surplus
(
0
);
data
.
setVedioplan_domob_vedio_surplus
(
10
);
data
.
setVedioplan_chuangshen_vedio_surplus
(
0
);
// 设置随机广告权重
if
(
vedioAdingManager
!=
null
)
{
vedioAdingManager
.
initAdWeight
(
data
.
getVedioplan_csj_vedio_rate
(),
data
.
getVedioplan_lyh_vedio_rate
(),
data
.
getVedioplan_csj_full_screen_video_rate
(),
data
.
getVedioplan_hytech_vedio_rate
(),
data
.
getVedioplan_mintegral_vedio_rate
(),
data
.
getVedioplan_coral_vedio_rate
(),
data
.
getVedioplan_chuangshen_vedio_rate
());
}
LogUtil
.
d
(
TAG
,
"首页权重值:csjVedioWeight:"
+
data
.
getVedioplan_csj_vedio_rate
()
+
" ylhWeight:"
+
data
.
getVedioplan_lyh_vedio_rate
()
+
" csjFullWeight:"
+
data
.
getVedioplan_csj_full_screen_video_rate
()
+
" hytechVedioAdWeight:"
+
data
.
getVedioplan_hytech_vedio_rate
()
+
" mintegralVedioAdWeight:"
+
data
.
getVedioplan_mintegral_vedio_rate
()
+
" shanhuVedioAdWeight:"
+
data
.
getVedioplan_coral_vedio_rate
()+
" chuangshenVedioAdWeight:"
+
data
.
getVedioplan_chuangshen_vedio_rate
());
vedioAdingManager
.
initAdWeight
(
data
.
getVedioplan_csj_vedio_rate
(),
data
.
getVedioplan_lyh_vedio_rate
(),
data
.
getVedioplan_csj_full_screen_video_rate
(),
data
.
getVedioplan_hytech_vedio_rate
(),
data
.
getVedioplan_mintegral_vedio_rate
(),
data
.
getVedioplan_coral_vedio_rate
(),
data
.
getVedioplan_chuangshen_vedio_rate
(),
data
.
getVedioplan_domob_vedio_rate
());
}
LogUtil
.
d
(
TAG
,
"首页权重值:csjVedioWeight:"
+
data
.
getVedioplan_csj_vedio_rate
()
+
" ylhWeight:"
+
data
.
getVedioplan_lyh_vedio_rate
()
+
" csjFullWeight:"
+
data
.
getVedioplan_csj_full_screen_video_rate
()
+
" hytechVedioAdWeight:"
+
data
.
getVedioplan_hytech_vedio_rate
()
+
" mintegralVedioAdWeight:"
+
data
.
getVedioplan_mintegral_vedio_rate
()
+
" shanhuVedioAdWeight:"
+
data
.
getVedioplan_coral_vedio_rate
()+
" chuangshenVedioAdWeight:"
+
data
.
getVedioplan_chuangshen_vedio_rate
()+
" domobVedioAdWeight:"
+
data
.
getVedioplan_domob_vedio_rate
());
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
getVedioplan_csj_vedio_surplus
();
AppConfig
.
ylhAdCount
=
data
.
getVedioplan_lyh_vedio_surplus
();
...
...
@@ -504,7 +510,11 @@ public class MainFragment extends BaseFragment
AppConfig
.
mintegralAdCount
=
data
.
getVedioplan_mintegral_vedio_surplus
();
AppConfig
.
shanhuAdCount
=
data
.
getVedioplan_coral_vedio_surplus
();
AppConfig
.
chuangshenVedioAdCount
=
data
.
getVedioplan_chuangshen_vedio_surplus
();
LogUtil
.
d
(
TAG
,
"首页视频数:csjVedioAdCount:"
+
data
.
getVedioplan_csj_vedio_surplus
()
+
" ylhAdCount:"
+
data
.
getVedioplan_lyh_vedio_surplus
()
+
" csjFullAdCount:"
+
data
.
getVedioplan_csj_full_screen_video_surplus
()
+
" hytechVedioAdCount:"
+
data
.
getVedioplan_hytech_vedio_surplus
()
+
" mintegralVedioAdCount:"
+
data
.
getVedioplan_mintegral_vedio_surplus
()
+
" shanhuVedioAdCount:"
+
data
.
getVedioplan_coral_vedio_surplus
()+
" chuangshenVedioAdCount:"
+
data
.
getVedioplan_chuangshen_vedio_surplus
());
AppConfig
.
duomentVedioAdCount
=
data
.
getVedioplan_domob_vedio_surplus
();
LogUtil
.
d
(
TAG
,
"首页视频数:csjVedioAdCount:"
+
data
.
getVedioplan_csj_vedio_surplus
()
+
" ylhAdCount:"
+
data
.
getVedioplan_lyh_vedio_surplus
()
+
" csjFullAdCount:"
+
data
.
getVedioplan_csj_full_screen_video_surplus
()
+
" hytechVedioAdCount:"
+
data
.
getVedioplan_hytech_vedio_surplus
()
+
" mintegralVedioAdCount:"
+
data
.
getVedioplan_mintegral_vedio_surplus
()
+
" shanhuVedioAdCount:"
+
data
.
getVedioplan_coral_vedio_surplus
()+
" chuangshenVedioAdCount:"
+
data
.
getVedioplan_chuangshen_vedio_surplus
()+
" domobVedioAdCount:"
+
data
.
getVedioplan_domob_vedio_surplus
());
AppConfig
.
yilanVedioTime
=
data
.
getRedPacketSecond
();
userManager
.
setAdShowFlag
(
data
.
isAdFlag
());
...
...
@@ -1434,7 +1444,8 @@ public class MainFragment extends BaseFragment
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_FULL_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
))
{
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
)||
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
YLH_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_YLH
;
...
...
@@ -1442,6 +1453,8 @@ public class MainFragment extends BaseFragment
AD_SOURCE
=
Constant
.
AD_SOURCE_MINTEGRAL
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
}
else
{
AD_SOURCE
=
Constant
.
AD_SOURCE_CSJ
;
}
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/VersusFragment.java
View file @
a59bdf71
...
...
@@ -2243,7 +2243,8 @@ public class VersusFragment extends BaseFragment
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_FULL_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
))
{
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
YLH_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_YLH
;
...
...
@@ -2251,6 +2252,8 @@ public class VersusFragment extends BaseFragment
AD_SOURCE
=
Constant
.
AD_SOURCE_MINTEGRAL
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_DOMOB
;
}
else
{
AD_SOURCE
=
Constant
.
AD_SOURCE_CSJ
;
}
...
...
highgold/build.gradle
View file @
a59bdf71
...
...
@@ -18,6 +18,9 @@ buildscript {
// maven { url 'https://raw.githubusercontent.com/TalkingData/SDKMaven/master/' }
}
dependencies
{
// domob广告
classpath
'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
classpath
'com.android.tools.build:gradle:3.5.1'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// TalkingDada 灵动事件
...
...
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