Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
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_flowbox
Commits
27953e96
Commit
27953e96
authored
Aug 03, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加网赚视频接口调用gromore方式
parent
2c3ea053
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
92 additions
and
63 deletions
+92
-63
FullGroManager.java
...c/main/java/com/mints/flowbox/ad/full/FullGroManager.java
+9
-32
InterstitialGroManager.java
...com/mints/flowbox/ad/inscreen/InterstitialGroManager.java
+10
-20
CsjFullVideoAdManager.java
...ava/com/mints/flowbox/ad/video/CsjFullVideoAdManager.java
+14
-0
CsjVideoAdManager.java
...in/java/com/mints/flowbox/ad/video/CsjVideoAdManager.java
+8
-0
KsVideoAdManager.kt
.../main/java/com/mints/flowbox/ad/video/KsVideoAdManager.kt
+9
-0
OwVideoAdManager.kt
.../main/java/com/mints/flowbox/ad/video/OwVideoAdManager.kt
+10
-0
WnVideoAdManager.kt
.../main/java/com/mints/flowbox/ad/video/WnVideoAdManager.kt
+10
-0
YlhVideoAdManager.java
...in/java/com/mints/flowbox/ad/video/YlhVideoAdManager.java
+10
-0
SplashGroMoreActivity.java
...com/mints/flowbox/ui/activitys/SplashGroMoreActivity.java
+12
-11
No files found.
app/src/main/java/com/mints/flowbox/ad/full/FullGroManager.java
View file @
27953e96
...
...
@@ -146,30 +146,6 @@ public class FullGroManager {
}
public
void
showFullAd
()
{
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"showFullAd isLoadSuccess="
+
isLoadSuccess
+
" isReady="
+
mTTFullVideoAd
.
isReady
());
}
if
(
isLoadSuccess
&&
mTTFullVideoAd
!=
null
&&
mTTFullVideoAd
.
isReady
()
&&
activity
!=
null
)
{
//设置监听器
mTTFullVideoAd
.
showFullAd
(
activity
,
mTTFullVideoAdListener
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mTTFullVideoAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mTTFullVideoAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mTTFullVideoAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE4
);
vo
.
put
(
"adid"
,
fullId
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
else
{
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess
=
false
;
if
(
this
.
wifiAdStatusListener
!=
null
)
{
this
.
wifiAdStatusListener
.
adFail
();
}
}
}
public
void
showFullAd
(
Activity
_activity
,
WifiAdStatusListener
wifiAdStatusListener
)
{
if
(
wifiAdStatusListener
!=
null
)
{
this
.
wifiAdStatusListener
=
wifiAdStatusListener
;
...
...
@@ -180,14 +156,6 @@ public class FullGroManager {
if
(
isLoadSuccess
&&
mTTFullVideoAd
!=
null
&&
mTTFullVideoAd
.
isReady
()
&&
activity
!=
null
)
{
//设置监听器
mTTFullVideoAd
.
showFullAd
(
_activity
,
mTTFullVideoAdListener
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mTTFullVideoAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mTTFullVideoAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mTTFullVideoAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE4
);
vo
.
put
(
"adid"
,
fullId
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
else
{
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess
=
false
;
...
...
@@ -204,6 +172,15 @@ public class FullGroManager {
@Override
public
void
onFullVideoAdShow
()
{
if
(
mTTFullVideoAd
!=
null
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mTTFullVideoAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mTTFullVideoAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mTTFullVideoAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE4
);
vo
.
put
(
"adid"
,
fullId
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
Log
.
d
(
TAG
,
"onFullVideoAdShow"
);
}
...
...
app/src/main/java/com/mints/flowbox/ad/inscreen/InterstitialGroManager.java
View file @
27953e96
...
...
@@ -126,18 +126,6 @@ public class InterstitialGroManager {
//设置监听器
mInterstitialAd
.
setTTAdInterstitialListener
(
interstitialListener
);
mInterstitialAd
.
showAd
(
activity
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mInterstitialAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mInterstitialAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mInterstitialAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE3
);
if
(
isMain
)
{
vo
.
put
(
"adid"
,
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_COMMON_AD_UNIT_NEW_INTERSTITIAL_ID
());
}
else
{
vo
.
put
(
"adid"
,
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID
());
}
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
else
{
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess
=
false
;
...
...
@@ -156,14 +144,6 @@ public class InterstitialGroManager {
//设置监听器
mInterstitialAd
.
setTTAdInterstitialListener
(
interstitialListener
);
mInterstitialAd
.
showAd
(
_activity
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mInterstitialAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mInterstitialAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mInterstitialAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE3
);
vo
.
put
(
"adid"
,
interstitialId
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
else
{
if
(
this
.
wifiAdStatusListener
!=
null
)
{
this
.
wifiAdStatusListener
.
adFail
();
...
...
@@ -180,6 +160,16 @@ public class InterstitialGroManager {
*/
@Override
public
void
onInterstitialShow
()
{
if
(
mInterstitialAd
!=
null
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mInterstitialAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mInterstitialAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mInterstitialAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE3
);
vo
.
put
(
"adid"
,
interstitialId
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
AppConfig
.
isShowInsertScreen
=
true
;
}
...
...
app/src/main/java/com/mints/flowbox/ad/video/CsjFullVideoAdManager.java
View file @
27953e96
...
...
@@ -2,6 +2,8 @@ package com.mints.flowbox.ad.video;
import
android.app.Activity
;
import
androidx.constraintlayout.widget.ConstraintLayout
;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
...
...
@@ -10,10 +12,14 @@ import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
import
com.mints.flowbox.MintsApplication
;
import
com.mints.flowbox.ad.video.base.BaseVideoAd
;
import
com.mints.flowbox.ad.video.base.VideoAdStatusListener
;
import
com.mints.flowbox.common.AppConfig
;
import
com.mints.flowbox.common.Constant
;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
import
com.mints.flowbox.manager.TrackManager
;
import
com.mints.flowbox.manager.TtCsjAdManager
;
import
java.util.HashMap
;
/**
* 穿山甲全屏广告
*/
...
...
@@ -95,6 +101,14 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
if
(
activity
!=
null
)
{
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_CSJFULL
,
extraId
,
curCoin
));
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
TtCsjAdManager
.
TT_AD_FULLVEDIO_ALL
);
vo
.
put
(
"ecpm"
,
""
);
vo
.
put
(
"adSource"
,
Constant
.
AD_SOURCE_CSJFULL
);
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE4
);
vo
.
put
(
"adid"
,
""
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
}
...
...
app/src/main/java/com/mints/flowbox/ad/video/CsjVideoAdManager.java
View file @
27953e96
...
...
@@ -158,6 +158,14 @@ public class CsjVideoAdManager extends BaseVideoAd {
public
void
onAdClose
()
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
codeId
);
vo
.
put
(
"ecpm"
,
""
);
vo
.
put
(
"adSource"
,
Constant
.
AD_SOURCE_CSJ
);
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE2
);
vo
.
put
(
"adid"
,
""
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
if
(
videoAdStatusListener
!=
null
)
{
videoAdStatusListener
.
adSuccess
();
}
...
...
app/src/main/java/com/mints/flowbox/ad/video/KsVideoAdManager.kt
View file @
27953e96
...
...
@@ -12,6 +12,7 @@ import com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.TrackManager
import
com.mints.flowbox.manager.ad.KsManager
import
com.mints.flowbox.utils.LogUtil
import
java.util.*
private
val
TAG
=
KsVideoAdManager
::
class
.
java
.
simpleName
...
...
@@ -65,6 +66,14 @@ class KsVideoAdManager public constructor() :
override
fun
onPageDismiss
()
{
// ToastUtil.show(activity, "快手激励视频⼴告关闭")
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adcode"
]
=
KsManager
.
KS_AD_VEDIO_POSTID
vo
[
"ecpm"
]
=
""
vo
[
"adSource"
]
=
Constant
.
AD_SOURCE_KS
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE2
vo
[
"adid"
]
=
""
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
)
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_KS
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
...
...
app/src/main/java/com/mints/flowbox/ad/video/OwVideoAdManager.kt
View file @
27953e96
...
...
@@ -6,12 +6,14 @@ import com.mints.flowbox.ad.video.base.VideoAdStatusListener
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.TrackManager
import
com.mints.flowbox.manager.ad.KsManager
import
com.mints.flowbox.manager.ad.OwManager
import
com.mints.flowbox.utils.LogUtil
import
mobi.oneway.export.Ad.OWRewardedAd
import
mobi.oneway.export.AdListener.OWRewardedAdListener
import
mobi.oneway.export.enums.OnewayAdCloseType
import
mobi.oneway.export.enums.OnewaySdkError
import
java.util.HashMap
private
val
TAG
=
OwVideoAdManager
::
class
.
java
.
simpleName
...
...
@@ -57,6 +59,14 @@ class OwVideoAdManager public constructor() :
}
override
fun
onAdClose
(
tag
:
String
,
onewayVideoCloseType
:
OnewayAdCloseType
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adcode"
]
=
OwManager
.
REWARD_PID
vo
[
"ecpm"
]
=
""
vo
[
"adSource"
]
=
Constant
.
AD_SOURCE_OW
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE2
vo
[
"adid"
]
=
""
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
)
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_OW
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_OW
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
...
...
app/src/main/java/com/mints/flowbox/ad/video/WnVideoAdManager.kt
View file @
27953e96
...
...
@@ -6,9 +6,11 @@ import com.mints.flowbox.ad.video.base.VideoAdStatusListener
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.TrackManager
import
com.mints.flowbox.manager.ad.OwManager
import
com.mints.flowbox.manager.ad.WnManager
import
com.mints.flowbox.utils.LogUtil
import
com.wannuosili.sdk.*
import
java.util.HashMap
private
val
TAG
=
WnVideoAdManager
::
class
.
java
.
simpleName
...
...
@@ -71,6 +73,14 @@ class WnVideoAdManager public constructor() :
}
override
fun
onAdClose
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adcode"
]
=
postId
vo
[
"ecpm"
]
=
""
vo
[
"adSource"
]
=
Constant
.
AD_SOURCE_SDHZ
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE2
vo
[
"adid"
]
=
""
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
)
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_SDHZ
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
...
...
app/src/main/java/com/mints/flowbox/ad/video/YlhVideoAdManager.java
View file @
27953e96
...
...
@@ -9,12 +9,14 @@ import com.mints.flowbox.ad.video.base.VideoAdStatusListener;
import
com.mints.flowbox.common.AppConfig
;
import
com.mints.flowbox.common.Constant
;
import
com.mints.flowbox.manager.TrackManager
;
import
com.mints.flowbox.manager.TtCsjAdManager
;
import
com.mints.flowbox.manager.ad.YlhAdManager
;
import
com.mints.flowbox.utils.LogUtil
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.comm.util.AdError
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
...
...
@@ -126,6 +128,14 @@ public class YlhVideoAdManager extends BaseVideoAd {
@Override
public
void
onADClose
()
{
//激励视频广告被关闭
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
ylhPostId
);
vo
.
put
(
"ecpm"
,
""
);
vo
.
put
(
"adSource"
,
Constant
.
AD_SOURCE_YLH
);
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE2
);
vo
.
put
(
"adid"
,
""
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_YLH
,
extraId
,
curCoin
));
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/SplashGroMoreActivity.java
View file @
27953e96
...
...
@@ -171,7 +171,6 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
goToMainActivity
();
},
500
);
}
@Override
...
...
@@ -186,14 +185,6 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
mTTSplashAd
.
showAd
(
mSplashContainer
);
isBaiduSplashAd
=
mTTSplashAd
.
getAdNetworkPlatformId
()
==
NetworkPlatformConst
.
SDK_NAME_BAIDU
;
// 获取本次waterfall加载中,加载失败的adn错误信息。
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mTTSplashAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mTTSplashAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mTTSplashAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE0
);
vo
.
put
(
"adid"
,
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_MAIN_AD_UNIT_SPLASH_ID
());
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
LogUtil
.
d
(
TAG
,
"load splash ad success "
);
},
500
);
...
...
@@ -224,6 +215,16 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
@Override
public
void
onAdShow
()
{
if
(
mTTSplashAd
!=
null
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mTTSplashAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mTTSplashAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mTTSplashAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE0
);
vo
.
put
(
"adid"
,
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_MAIN_AD_UNIT_SPLASH_ID
());
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
LogUtil
.
d
(
TAG
,
"onAdShow"
);
}
...
...
@@ -334,7 +335,7 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
@Override
public
void
doInIOThread
()
{
LogUtil
.
d
(
TAG
,
"子线程判断是否加载开屏"
);
setT
(
DeviceInfo
.
Companion
.
getInstance
().
getAPPInstalledThreeDay
(
MintsApplication
.
getContext
(),
data
.
getCloseNeedInitAppsCount
()));
setT
(
DeviceInfo
.
Companion
.
getInstance
().
getAPPInstalledThreeDay
(
MintsApplication
.
getContext
(),
data
.
getCloseNeedInitAppsCount
()));
}
@Override
...
...
@@ -356,7 +357,7 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
mMainHandler
.
postDelayed
(()
->
{
goToMainActivity
();
},
5000
);
}
else
{
}
else
{
initData
();
}
}
...
...
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