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
518d618c
Commit
518d618c
authored
May 26, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化创神回调bug
parent
8f85e410
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
146 additions
and
73 deletions
+146
-73
MintsApplication.java
...pp/src/main/java/com/mints/highgold/MintsApplication.java
+1
-1
ChuangshenVedioAdManager.kt
...in/java/com/mints/highgold/ad/ChuangshenVedioAdManager.kt
+6
-5
DomobVedioAdManager.kt
...rc/main/java/com/mints/highgold/ad/DomobVedioAdManager.kt
+73
-0
ShanhuVedioAdManager.java
...main/java/com/mints/highgold/ad/ShanhuVedioAdManager.java
+10
-3
VedioAdingManager.java
...rc/main/java/com/mints/highgold/ad/VedioAdingManager.java
+18
-31
UserTaskMsgBean.java
...in/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
+19
-0
CsVedioPresenter.kt
...ava/com/mints/highgold/mvp/presenters/CsVedioPresenter.kt
+0
-4
CsVedioView.kt
...src/main/java/com/mints/highgold/mvp/views/CsVedioView.kt
+0
-1
AwardActivity.java
...n/java/com/mints/highgold/ui/activitys/AwardActivity.java
+2
-3
CsVedioActivity.kt
...n/java/com/mints/highgold/ui/activitys/CsVedioActivity.kt
+2
-9
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+13
-14
VersusFragment.java
...n/java/com/mints/highgold/ui/fragment/VersusFragment.java
+2
-2
No files found.
highgold/app/src/main/java/com/mints/highgold/MintsApplication.java
View file @
518d618c
...
...
@@ -441,7 +441,7 @@ public class MintsApplication extends MultiDexApplication {
* setAutoConnectionSwitch()影响渠道号上报这个自动联网项是否运行。请不要一直设置为false,影响激活量和活跃量统计,后台会关注并停止相关服务,请在过工信部测试允许联网后,设置回true
*/
ShanHuAD
.
init
(
TMSDKContext
.
getApplicationContext
(),
new
H5Browser
(),
TMSDKContext
.
getCoinProductId
());
LogUtil
.
d
(
TAG
,
"shanhuFlag:"
+
shanhuFlag
);
//
LogUtil.d(TAG, "shanhuFlag:" + shanhuFlag);
}
/**
...
...
highgold/app/src/main/java/com/mints/highgold/ad/ChuangshenVedioAdManager.kt
View file @
518d618c
...
...
@@ -36,11 +36,12 @@ class ChuangshenVedioAdManager private constructor(activity: Activity) {
fun
loadChuangshenAd
(
downloadCoin
:
Int
=
0
,
curCoin
:
Int
=
0
,
carrierType
:
String
?,
extraId
:
String
?)
{
chuangshenVedioAdListener
?.
chuangshenVedioAdSuccess
()
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
TRY_VEDIO_COIN
,
curCoin
.
toString
())
bundle
.
putString
(
Constant
.
TRY_TASK_H5DOWNLOADCOIN
,
downloadCoin
.
toString
())
bundle
.
putString
(
Constant
.
TRY_CARRIER
,
carrierType
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
extraId
)
val
bundle
=
Bundle
().
apply
{
putString
(
Constant
.
TRY_VEDIO_COIN
,
curCoin
.
toString
())
putString
(
Constant
.
TRY_TASK_H5DOWNLOADCOIN
,
downloadCoin
.
toString
())
putString
(
Constant
.
TRY_CARRIER
,
carrierType
)
putString
(
Constant
.
MAIN_EXTRA_ID
,
extraId
)
}
readyGo
(
CsVedioActivity
::
class
.
java
,
bundle
)
}
...
...
highgold/app/src/main/java/com/mints/highgold/ad/DomobVedioAdManager.kt
0 → 100644
View file @
518d618c
package
com.mints.highgold.ad
import
android.app.Activity
import
com.mints.highgold.MintsApplication
import
com.mints.highgold.mvp.views.ShanhuVedioAdManagerView
/**
* 多盟视频
*/
class
DomobVedioAdManager
private
constructor
(
activity
:
Activity
)
:
ShanhuVedioAdManagerView
{
private
val
TAG
=
DomobVedioAdManager
::
class
.
java
.
simpleName
private
var
domobVedioAdListener
:
DomobVedioAdListener
?
=
null
var
activity
:
Activity
?
=
null
private
var
curCoin
=
0
private
var
extraId
:
String
?
=
null
private
var
downloadCoin
=
10
private
var
carrierType
=
""
companion
object
{
private
var
_inst
:
DomobVedioAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
DomobVedioAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
DomobVedioAdManager
(
activity
)
_inst
}
}
}
init
{
init
(
activity
)
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
}
fun
loadDomobAd
(
downloadCoin
:
Int
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
this
.
downloadCoin
=
downloadCoin
this
.
carrierType
=
carrierType
this
.
curCoin
=
curCoin
this
.
extraId
=
extraId
}
fun
setDomobVedioAdListener
(
domobVedioAdListener
:
DomobVedioAdListener
?)
{
this
.
domobVedioAdListener
=
domobVedioAdListener
}
interface
DomobVedioAdListener
{
fun
domobVedioAdSuccess
()
fun
domobVedioAdFail
()
fun
domobVedioAdDownload
()
}
override
fun
showLoading
(
msg
:
String
?)
{
TODO
(
"Not yet implemented"
)
}
override
fun
showToast
(
msg
:
String
?)
{
TODO
(
"Not yet implemented"
)
}
override
fun
hideLoading
()
{
TODO
(
"Not yet implemented"
)
}
override
fun
getBaseApplication
()
=
activity
?.
application
as
MintsApplication
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/ad/ShanhuVedioAdManager.java
View file @
518d618c
...
...
@@ -11,6 +11,8 @@ import com.mints.highgold.manager.UserManager;
import
com.mints.highgold.mvp.presenters.ShanhuVedioAdPresenter
;
import
com.mints.highgold.mvp.views.ShanhuVedioAdManagerView
;
import
com.mints.highgold.utils.LogUtil
;
import
com.mints.highgold.utils.MD5
;
import
com.mints.highgold.utils.SPUtil
;
import
com.mints.highgold.utils.shanhu.CommonUtil
;
import
com.mints.library.utils.json.JsonUtil
;
import
com.tencent.ep.shanhuad.adpublic.ADError
;
...
...
@@ -46,10 +48,10 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
private
ShanhuVedioAdPresenter
shanhuVedioAdPresenter
;
private
Activity
activity
;
private
RewardVideo
mRewardVedio
;
private
SPUtil
spUtil
;
private
int
curCoin
;
private
String
extraId
;
private
String
carrierType
;
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
private
UserManager
userManager
;
...
...
@@ -77,7 +79,7 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
this
.
activity
=
activity
;
userManager
=
UserManager
.
getInstance
();
spUtil
=
SPUtil
.
getInstance
(
activity
);
shanhuVedioAdPresenter
=
new
ShanhuVedioAdPresenter
();
shanhuVedioAdPresenter
.
attachView
(
this
);
mCoinManager
=
ManagerCreator
.
getManager
(
CoinManager
.
class
);
...
...
@@ -98,7 +100,6 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
this
.
curCoin
=
curCoin
;
this
.
extraId
=
extraId
;
this
.
carrierType
=
carrierType
;
if
(!
MintsApplication
.
shanhuFlag
)
{
((
MintsApplication
)
activity
.
getApplication
()).
initShanhuAd
();
...
...
@@ -311,6 +312,12 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
vo
.
put
(
"carrierType"
,
carrierType
);
vo
.
put
(
"adtype"
,
Constant
.
ADTYPE_VEDIO
);
vo
.
put
(
"adsource"
,
Constant
.
AD_SOURCE_SHANHU
);
if
(
spUtil
!=
null
)
{
vo
.
put
(
"ip"
,
spUtil
.
getString
(
Constant
.
CSJ_VEDIO_APPIP
));
}
String
userID
=
userManager
.
getUserID
();
String
tid
=
MD5
.
GetMD5Code
(
String
.
valueOf
(
System
.
currentTimeMillis
())
+
userID
);
vo
.
put
(
"tid"
,
tid
);
switch
(
carrierType
)
{
case
Constant
.
CARRIER_VERSUS_VIDEO
:
// 每日任务-视频
...
...
highgold/app/src/main/java/com/mints/highgold/ad/VedioAdingManager.java
View file @
518d618c
...
...
@@ -83,7 +83,7 @@ public class VedioAdingManager {
/**
* 初始化广告权重
*/
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
csjFullWeight
,
int
hytechVedioWeight
,
int
mintegralWeight
,
int
shanhuWeight
)
{
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
csjFullWeight
,
int
hytechVedioWeight
,
int
mintegralWeight
,
int
shanhuWeight
,
int
chuangshenWeight
)
{
this
.
csjVedioWeight
=
csjVedioWeight
;
this
.
ylhWeight
=
ylhWeight
;
this
.
csjFullWeight
=
csjFullWeight
;
...
...
@@ -126,10 +126,12 @@ public class VedioAdingManager {
nextAdType
=
Constant
.
MINTEGRAL_VEDIO_AD
;
}
else
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
nextAdType
=
Constant
.
SHANHU_VEDIO_AD
;
}
else
if
(
AppConfig
.
hytechVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
HYTECH_VEDIO_AD
;
}
else
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_FULL_AD
;
}
else
if
(
AppConfig
.
chuangshenVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CHUANGSHEN_VEDIO_AD
;
}
else
if
(
AppConfig
.
hytechVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
HYTECH_VEDIO_AD
;
}
return
nextAdType
;
}
...
...
@@ -237,9 +239,11 @@ public class VedioAdingManager {
int
hytechVedioAdCount
=
AppConfig
.
hytechVedioAdCount
;
int
mintegralAdCount
=
AppConfig
.
mintegralAdCount
;
int
shanhuAdCount
=
AppConfig
.
shanhuAdCount
;
int
chuangshenVedioAdCount
=
AppConfig
.
chuangshenVedioAdCount
;
if
(
csjFullAdCount
<=
0
&&
ylhAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
hytechVedioAdCount
<=
0
&&
mintegralAdCount
<=
0
&&
shanhuAdCount
<=
0
)
{
mintegralAdCount
<=
0
&&
shanhuAdCount
<=
0
&&
chuangshenVedioAdCount
<=
0
)
{
// showToast("今日视频已看完,请明天再来吧");
return
true
;
}
...
...
@@ -275,6 +279,8 @@ public class VedioAdingManager {
shanhuVedioAdManager
.
destory
();
shanhuVedioAdManager
=
null
;
}
chuangshenVedioAdManager
=
null
;
}
public
void
setVedioAdingListener
(
VedioAdingListener
vedioAdingListener
)
{
...
...
@@ -317,10 +323,6 @@ public class VedioAdingManager {
ylhVedioAdManager
=
YlhVedioAdManager
.
getInstance
(
activity
);
}
// 重置监听
ylhVedioAdManager
.
setYlhVedioAdListener
(
null
);
ylhVedioAdManager
.
loanYlhAd
(
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
ylhVedioAdManager
.
setYlhVedioAdListener
(
new
YlhVedioAdManager
.
YlhVedioAdListener
()
{
@Override
public
void
ylhVedioAdFail
()
{
...
...
@@ -344,6 +346,7 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
ylhVedioAdManager
.
loanYlhAd
(
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
CSJ_FULL_AD
))
{
// 穿山甲全屏
if
(
csjFullVedioAdManager
==
null
)
{
...
...
@@ -356,10 +359,6 @@ public class VedioAdingManager {
csjFullVedioAdManager
=
CsjFullVedioAdManager
.
getInstance
(
activity
);
}
// 重置监听
csjFullVedioAdManager
.
setCsjFullVedioAdListener
(
null
);
csjFullVedioAdManager
.
loadCsjFullAd
(
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
csjFullVedioAdManager
.
setCsjFullVedioAdListener
(
new
CsjFullVedioAdManager
.
CsjFullVedioAdListener
()
{
@Override
public
void
csjFullVedioAdFail
()
{
...
...
@@ -383,6 +382,7 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
csjFullVedioAdManager
.
loadCsjFullAd
(
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
CSJ_VEDIO_AD
))
{
// 穿山甲激励视频
if
(
csjVedioAdManager
==
null
)
{
...
...
@@ -395,10 +395,7 @@ public class VedioAdingManager {
csjVedioAdManager
=
CsjVedioAdManager
.
getInstance
(
activity
);
}
// 重置监听
csjVedioAdManager
.
setCsjVedioAdListener
(
null
);
csjVedioAdManager
.
loadCsjAd
(
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
csjVedioAdManager
.
setCsjVedioAdListener
(
new
CsjVedioAdManager
.
CsjVedioAdListener
()
{
@Override
public
void
csjVedioAdFail
()
{
...
...
@@ -422,6 +419,7 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
csjVedioAdManager
.
loadCsjAd
(
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
HYTECH_VEDIO_AD
))
{
// HYTECH
if
(
hytechVedioAdManager
==
null
)
{
...
...
@@ -434,10 +432,7 @@ public class VedioAdingManager {
hytechVedioAdManager
=
HytechVedioAdManager
.
getInstance
(
activity
);
}
// 重置监听
hytechVedioAdManager
.
setHytechVedioAdListener
(
null
);
hytechVedioAdManager
.
loanHytechAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
hytechVedioAdManager
.
setHytechVedioAdListener
(
new
HytechVedioAdManager
.
HytechVedioAdListener
()
{
@Override
public
void
hytechVedioAdFail
()
{
...
...
@@ -456,6 +451,7 @@ public class VedioAdingManager {
}
}
});
hytechVedioAdManager
.
loanHytechAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
MINTEGRAL_VEDIO_AD
))
{
// MINTEGRAL激励视频
if
(
mintegralVedioAdManager
==
null
)
{
...
...
@@ -468,10 +464,6 @@ public class VedioAdingManager {
mintegralVedioAdManager
=
MintegralVedioAdManager
.
getInstance
(
activity
);
}
// 重置监听
mintegralVedioAdManager
.
setMintegralVedioAdListener
(
null
);
mintegralVedioAdManager
.
loadMintegralAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
mintegralVedioAdManager
.
setMintegralVedioAdListener
(
new
MintegralVedioAdManager
.
MintegralVedioAdListener
()
{
@Override
public
void
mintegralVedioAdFail
()
{
...
...
@@ -495,6 +487,7 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
mintegralVedioAdManager
.
loadMintegralAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
SHANHU_VEDIO_AD
))
{
// 珊瑚激励视频
if
(
shanhuVedioAdManager
==
null
)
{
...
...
@@ -507,10 +500,6 @@ public class VedioAdingManager {
shanhuVedioAdManager
=
ShanhuVedioAdManager
.
getInstance
(
activity
);
}
// 重置监听
shanhuVedioAdManager
.
setShanhuVedioAdListener
(
null
);
shanhuVedioAdManager
.
loadShanhuAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
shanhuVedioAdManager
.
setShanhuVedioAdListener
(
new
ShanhuVedioAdManager
.
ShanhuVedioAdListener
()
{
@Override
public
void
shanhuVedioAdFail
()
{
...
...
@@ -534,7 +523,8 @@ public class VedioAdingManager {
isVedioAdDownload
=
true
;
}
});
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
CHUANGSHEN_VEDIO_AD
))
{
shanhuVedioAdManager
.
loadShanhuAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
CHUANGSHEN_VEDIO_AD
))
{
// 创神激励视频
if
(
chuangshenVedioAdManager
==
null
)
{
if
(
activity
==
null
)
{
...
...
@@ -546,10 +536,6 @@ public class VedioAdingManager {
chuangshenVedioAdManager
=
ChuangshenVedioAdManager
.
Companion
.
getInstance
(
activity
);
}
// 重置监听
chuangshenVedioAdManager
.
setChuangshenVedioAdListener
(
null
);
chuangshenVedioAdManager
.
loadChuangshenAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
chuangshenVedioAdManager
.
setChuangshenVedioAdListener
(
new
ChuangshenVedioAdManager
.
ChuangshenVedioAdListener
()
{
@Override
public
void
chuangshenVedioAdSuccess
()
{
...
...
@@ -561,6 +547,7 @@ public class VedioAdingManager {
}
}
});
chuangshenVedioAdManager
.
loadChuangshenAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
View file @
518d618c
...
...
@@ -73,6 +73,8 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_hytech_vedio_rate
;
private
int
vedioplan_mintegral_vedio_rate
;
private
int
vedioplan_coral_vedio_rate
;
private
int
vedioplan_chuangshen_vedio_rate
;
private
int
vedioplan_csj_vedio_surplus
;
private
int
vedioplan_liyan_vedio_surplus
;
private
int
vedioplan_lyh_vedio_surplus
;
...
...
@@ -80,6 +82,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_hytech_vedio_surplus
;
private
int
vedioplan_mintegral_vedio_surplus
;
private
int
vedioplan_coral_vedio_surplus
;
private
int
vedioplan_chuangshen_vedio_surplus
;
public
int
getVedioplan_hytech_vedio_rate
()
{
return
vedioplan_hytech_vedio_rate
;
...
...
@@ -409,4 +412,20 @@ public class UserTaskMsgBean implements Serializable {
public
void
setVedioplan_coral_vedio_surplus
(
int
vedioplan_coral_vedio_surplus
)
{
this
.
vedioplan_coral_vedio_surplus
=
vedioplan_coral_vedio_surplus
;
}
public
int
getVedioplan_chuangshen_vedio_rate
()
{
return
vedioplan_chuangshen_vedio_rate
;
}
public
void
setVedioplan_chuangshen_vedio_rate
(
int
vedioplan_chuangshen_vedio_rate
)
{
this
.
vedioplan_chuangshen_vedio_rate
=
vedioplan_chuangshen_vedio_rate
;
}
public
int
getVedioplan_chuangshen_vedio_surplus
()
{
return
vedioplan_chuangshen_vedio_surplus
;
}
public
void
setVedioplan_chuangshen_vedio_surplus
(
int
vedioplan_chuangshen_vedio_surplus
)
{
this
.
vedioplan_chuangshen_vedio_surplus
=
vedioplan_chuangshen_vedio_surplus
;
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/CsVedioPresenter.kt
View file @
518d618c
...
...
@@ -65,10 +65,6 @@ class CsVedioPresenter : BasePresenter<CsVedioView>() {
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
?
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
when
(
code
)
{
200
->
view
.
reportDownloadTask
()
}
}
})
}
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/views/CsVedioView.kt
View file @
518d618c
package
com.mints.highgold.mvp.views
interface
CsVedioView
:
BaseView
{
fun
reportDownloadTask
()
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/ui/activitys/AwardActivity.java
View file @
518d618c
...
...
@@ -333,7 +333,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
}
else
{
bean
.
setDownloadCoin
(
0
);
}
vedioAdingManager
.
loadAding
(
bean
);
vedioAdingManager
.
setVedioAdingListener
(
new
VedioAdingManager
.
VedioAdingListener
()
{
@Override
public
void
vedioAdingListenerError
(
String
adType
)
{
...
...
@@ -342,7 +341,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
@Override
public
void
vedioAdingListenerFail
(
String
adType
)
{
vedioAdingManager
.
loadFailAding
(
bean
);
vedioAdingManager
.
setVedioAdingListener
(
new
VedioAdingManager
.
VedioAdingListener
()
{
@Override
public
void
vedioAdingListenerError
(
String
adType
)
{
...
...
@@ -365,7 +363,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
vedioAdingSuccess
(
adType
);
}
});
vedioAdingManager
.
loadFailAding
(
bean
);
}
@Override
...
...
@@ -374,6 +372,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
vedioAdingSuccess
(
adType
);
}
});
vedioAdingManager
.
loadAding
(
bean
);
return
;
}
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/CsVedioActivity.kt
View file @
518d618c
...
...
@@ -39,18 +39,11 @@ class CsVedioActivity : BaseActivity()
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
// vedioCoin = extras!!.getString(Constant.TRY_VEDIO_COIN)
// vedioDownloadCoin = extras.getString(Constant.TRY_TASK_H5DOWNLOADCOIN)
// tryCarrier = extras.getString(Constant.TRY_CARRIER)
// extraId = extras.getString(Constant.MAIN_EXTRA_ID)
extras
?.
let
{
vedioCoin
=
it
.
getString
(
Constant
.
TRY_VEDIO_COIN
)
vedioDownloadCoin
=
it
.
getString
(
Constant
.
TRY_TASK_H5DOWNLOADCOIN
)
tryCarrier
=
it
.
getString
(
Constant
.
TRY_CARRIER
)
extraId
=
it
.
getString
(
Constant
.
MAIN_EXTRA_ID
)
LogUtil
.
d
(
TAG
,
"vedioCoin=${vedioCoin} vedioDownloadCoin=${vedioDownloadCoin} tryCarrier=${tryCarrier} extraId=${extraId} "
)
}
}
...
...
@@ -81,8 +74,6 @@ class CsVedioActivity : BaseActivity()
if
(
isLoadError
)
super
.
onBackPressed
()
}
override
fun
reportDownloadTask
()
{
}
private
fun
loadVedio
()
{
csAdVideoView
?.
setAdListener
(
object
:
VideoCallback
()
{
...
...
@@ -154,6 +145,8 @@ class CsVedioActivity : BaseActivity()
override
fun
onAdFailed
(
msg
:
String
)
{
isLoadError
=
true
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CHUANGSHEN
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
msg
)
LogUtil
.
d
(
TAG
,
"onAdFailed:"
+
msg
)
}
override
fun
onAdLoadOver
()
{
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
518d618c
...
...
@@ -4,7 +4,6 @@ import android.Manifest;
import
android.os.Bundle
;
import
android.support.v7.app.AlertDialog
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.animation.AccelerateDecelerateInterpolator
;
...
...
@@ -27,13 +26,10 @@ 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.ChuangshenVedioAdManager
;
import
com.mints.highgold.ad.ShanhuVedioAdManager
;
import
com.mints.highgold.ad.VedioAdingManager
;
import
com.mints.highgold.ad.inscreenvedio.MintegralInscreenVedioAdManager
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.common.DeviceInfo
;
import
com.mints.highgold.manager.AmapLocationManager
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.ShumeiManager
;
...
...
@@ -359,8 +355,8 @@ public class MainFragment extends BaseFragment
Bundle
bundle
;
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_fragment_main_whatgold
:
// 如何赚金币
//
readyGo(WhatGoldActivity.class);
ChuangshenVedioAdManager
.
Companion
.
getInstance
(
getActivity
()).
loadChuangshen
Ad
(
10
,
20
,
"main"
,
"abc"
);
readyGo
(
WhatGoldActivity
.
class
);
// DomobVedioAdManager.Companion.getInstance(getActivity()).loadDomob
Ad(10,20,"main","abc");
break
;
case
R
.
id
.
rl_fragment_main_redbox
:
// 红包
readyGo
(
RedboxActivity
.
class
);
...
...
@@ -482,28 +478,31 @@ public class MainFragment extends BaseFragment
// 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(5);
// 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(20);
// data.setVedioplan_coral_vedio_surplus(0);
// data.setVedioplan_chuangshen_vedio_surplus(10);
// 设置随机广告权重
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
());
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
());
// 广告
完成
数
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
()
);
// 广告
视频
数
AppConfig
.
csjVedioAdCount
=
data
.
getVedioplan_csj_vedio_surplus
();
AppConfig
.
ylhAdCount
=
data
.
getVedioplan_lyh_vedio_surplus
();
AppConfig
.
csjFullAdCount
=
data
.
getVedioplan_csj_full_screen_video_surplus
();
AppConfig
.
hytechVedioAdCount
=
data
.
getVedioplan_hytech_vedio_surplus
();
AppConfig
.
mintegralAdCount
=
data
.
getVedioplan_mintegral_vedio_surplus
();
AppConfig
.
shanhuAdCount
=
data
.
getVedioplan_coral_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
());
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
.
yilanVedioTime
=
data
.
getRedPacketSecond
();
userManager
.
setAdShowFlag
(
data
.
isAdFlag
());
...
...
@@ -1381,7 +1380,7 @@ public class MainFragment extends BaseFragment
public
void
vedioAdingListenerFail
(
String
adType
)
{
// showToast("人工添加,第一次加载失败");
vedioAdingManager
.
loadFailAding
(
bean
);
vedioAdingManager
.
setVedioAdingListener
(
new
VedioAdingManager
.
VedioAdingListener
()
{
@Override
public
void
vedioAdingListenerError
(
String
adType
)
{
...
...
@@ -1405,7 +1404,7 @@ public class MainFragment extends BaseFragment
vedioAdingSuccess
(
adType
,
carrierType
);
}
});
vedioAdingManager
.
loadFailAding
(
bean
);
}
@Override
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/VersusFragment.java
View file @
518d618c
...
...
@@ -2193,7 +2193,7 @@ public class VersusFragment extends BaseFragment
LogUtil
.
d
(
TAG
,
"Versus VedioAdingManager: vedioAdingListenerFail"
);
// hideLoading();
vedioAdingManager
.
loadFailAding
(
bean
);
vedioAdingManager
.
setVedioAdingListener
(
new
VedioAdingManager
.
VedioAdingListener
()
{
@Override
public
void
vedioAdingListenerError
(
String
adType
)
{
...
...
@@ -2217,7 +2217,7 @@ public class VersusFragment extends BaseFragment
vedioAdingSuccess
(
adType
,
carrierType
);
}
});
vedioAdingManager
.
loadFailAding
(
bean
);
}
@Override
...
...
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