Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
badca490
Commit
badca490
authored
Jun 01, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gromore 优化
parent
25d212f9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
9 deletions
+21
-9
GroMoreCarrierExpressManager.kt
...ints/goodmoney/ad/express/GroMoreCarrierExpressManager.kt
+12
-1
GroMoreExpressManager.kt
...a/com/mints/goodmoney/ad/express/GroMoreExpressManager.kt
+1
-1
CsjGroMoreVideoAdManager.java
...om/mints/goodmoney/ad/video/CsjGroMoreVideoAdManager.java
+3
-3
CsjGroMoreManager.kt
...ain/java/com/mints/goodmoney/manager/CsjGroMoreManager.kt
+3
-1
SplashGroMoreActivity.java
...m/mints/goodmoney/ui/activitys/SplashGroMoreActivity.java
+2
-3
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/express/GroMoreCarrierExpressManager.kt
View file @
badca490
...
@@ -7,11 +7,14 @@ import android.widget.FrameLayout
...
@@ -7,11 +7,14 @@ import android.widget.FrameLayout
import
com.bytedance.msdk.api.*
import
com.bytedance.msdk.api.*
import
com.bytedance.msdk.api.nativeAd.*
import
com.bytedance.msdk.api.nativeAd.*
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.CsjGroMoreManager
import
com.mints.goodmoney.manager.CsjGroMoreManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.UIUtils
import
com.mints.goodmoney.utils.UIUtils
import
com.mints.goodmoney.utils.VideoOptionUtil
import
com.mints.goodmoney.utils.VideoOptionUtil
import
java.util.HashMap
private
val
TAG
=
GroMoreCarrierExpressManager
::
class
.
java
.
simpleName
private
val
TAG
=
GroMoreCarrierExpressManager
::
class
.
java
.
simpleName
...
@@ -57,7 +60,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
...
@@ -57,7 +60,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
}
private
fun
loadAd
()
{
private
fun
loadAd
()
{
mTTAdNative
=
TTUnifiedNativeAd
(
MintsApplication
.
getContext
(),
CsjGroMoreManager
.
AD_UNIT_ID
)
mTTAdNative
=
TTUnifiedNativeAd
(
MintsApplication
.
getContext
(),
CsjGroMoreManager
.
AD_UNIT_
EXPRESS_
ID
)
//视频声音控制设置
//视频声音控制设置
var
videoOption
:
TTVideoOption
=
VideoOptionUtil
.
getTTVideoOption
()
var
videoOption
:
TTVideoOption
=
VideoOptionUtil
.
getTTVideoOption
()
...
@@ -125,6 +128,14 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
...
@@ -125,6 +128,14 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
if
(
ads
.
size
>
0
)
{
if
(
ads
.
size
>
0
)
{
frameLayout
?.
addView
(
ads
[
0
].
expressView
)
frameLayout
?.
addView
(
ads
[
0
].
expressView
)
val
ttNativeAd
=
ads
[
0
]
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adcode"
]
=
ttNativeAd
.
getAdNetworkRitId
()
vo
[
"ecpm"
]
=
ttNativeAd
.
getPreEcpm
()
vo
[
"adSource"
]
=
ttNativeAd
.
getAdNetworkPlatformId
()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
)
// sAdFrameLayout.addView(createAdView(ads[0]))
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/express/GroMoreExpressManager.kt
View file @
badca490
...
@@ -62,7 +62,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
...
@@ -62,7 +62,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
}
}
private
fun
loadAd
()
{
private
fun
loadAd
()
{
mTTAdNative
=
TTUnifiedNativeAd
(
MintsApplication
.
getContext
(),
CsjGroMoreManager
.
AD_UNIT_ID
)
mTTAdNative
=
TTUnifiedNativeAd
(
MintsApplication
.
getContext
(),
CsjGroMoreManager
.
AD_UNIT_
EXPRESS_
ID
)
//视频声音控制设置
//视频声音控制设置
var
videoOption
:
TTVideoOption
=
VideoOptionUtil
.
getTTVideoOption
()
var
videoOption
:
TTVideoOption
=
VideoOptionUtil
.
getTTVideoOption
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/CsjGroMoreVideoAdManager.java
View file @
badca490
...
@@ -22,6 +22,7 @@ import com.mints.goodmoney.ad.video.base.BaseVideoAd;
...
@@ -22,6 +22,7 @@ import com.mints.goodmoney.ad.video.base.BaseVideoAd;
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
;
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.CsjGroMoreManager
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
...
@@ -52,7 +53,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -52,7 +53,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private
Activity
activity
;
private
Activity
activity
;
private
String
adUnitId
=
"946018378"
;
//代码位
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
...
@@ -98,7 +98,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -98,7 +98,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
* 判断当前是否存在config 配置 ,如果存在直接加载广告 ,如果不存在则注册config加载回调
* 判断当前是否存在config 配置 ,如果存在直接加载广告 ,如果不存在则注册config加载回调
*/
*/
if
(
TTMediationAdSdk
.
configLoadSuccess
())
{
if
(
TTMediationAdSdk
.
configLoadSuccess
())
{
loadAd
(
adUnitId
,
TTAdConstant
.
VERTICAL
);
loadAd
(
CsjGroMoreManager
.
AD_UNIT_VIDEO_ID
,
TTAdConstant
.
VERTICAL
);
}
else
{
}
else
{
TTMediationAdSdk
.
registerConfigCallback
(
mSettingConfigCallback
);
//不用使用内部类,否则在ondestory中无法移除该回调
TTMediationAdSdk
.
registerConfigCallback
(
mSettingConfigCallback
);
//不用使用内部类,否则在ondestory中无法移除该回调
}
}
...
@@ -110,7 +110,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -110,7 +110,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private
TTSettingConfigCallback
mSettingConfigCallback
=
new
TTSettingConfigCallback
()
{
private
TTSettingConfigCallback
mSettingConfigCallback
=
new
TTSettingConfigCallback
()
{
@Override
@Override
public
void
configLoad
()
{
public
void
configLoad
()
{
loadAd
(
adUnitId
,
TTAdConstant
.
VERTICAL
);
loadAd
(
CsjGroMoreManager
.
AD_UNIT_VIDEO_ID
,
TTAdConstant
.
VERTICAL
);
}
}
};
};
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/CsjGroMoreManager.kt
View file @
badca490
...
@@ -5,7 +5,9 @@ import com.mints.goodmoney.MintsApplication
...
@@ -5,7 +5,9 @@ import com.mints.goodmoney.MintsApplication
object
CsjGroMoreManager
{
object
CsjGroMoreManager
{
const
val
AD_UNIT_ID
=
"946167770"
const
val
AD_UNIT_EXPRESS_ID
=
"946167770"
const
val
AD_UNIT_SPLASH_ID
=
"887459392"
const
val
AD_UNIT_VIDEO_ID
=
"946018378"
fun
init
(
application
:
MintsApplication
)
{
fun
init
(
application
:
MintsApplication
)
{
TTGroMoreAdManagerHolder
.
init
(
application
)
TTGroMoreAdManagerHolder
.
init
(
application
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashGroMoreActivity.java
View file @
badca490
...
@@ -17,6 +17,7 @@ import com.mints.goodmoney.MintsApplication;
...
@@ -17,6 +17,7 @@ import com.mints.goodmoney.MintsApplication;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.DeviceInfo
;
import
com.mints.goodmoney.common.DeviceInfo
;
import
com.mints.goodmoney.manager.CsjGroMoreManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.UserManager
;
...
@@ -39,7 +40,6 @@ public class SplashGroMoreActivity extends BaseActivity {
...
@@ -39,7 +40,6 @@ public class SplashGroMoreActivity extends BaseActivity {
private
FrameLayout
mSplashContainer
;
private
FrameLayout
mSplashContainer
;
//是否强制跳转到主页面
//是否强制跳转到主页面
private
boolean
mForceGoMain
;
private
boolean
mForceGoMain
;
private
String
mAdUnitId
=
"887459392"
;
//开屏广告加载超时时间,建议大于1000,这里为了冷启动第一次加载到广告并且展示,示例设置了2000ms
//开屏广告加载超时时间,建议大于1000,这里为了冷启动第一次加载到广告并且展示,示例设置了2000ms
private
static
final
int
AD_TIME_OUT
=
4000
;
private
static
final
int
AD_TIME_OUT
=
4000
;
...
@@ -78,12 +78,11 @@ public class SplashGroMoreActivity extends BaseActivity {
...
@@ -78,12 +78,11 @@ public class SplashGroMoreActivity extends BaseActivity {
* 加载开屏广告
* 加载开屏广告
*/
*/
private
void
loadSplashAd
()
{
private
void
loadSplashAd
()
{
if
(
mAdUnitId
==
null
)
return
;
/**
/**
* 注:每次加载开屏广告的时候需要新建一个TTSplashAd,否则可能会出现广告填充问题
* 注:每次加载开屏广告的时候需要新建一个TTSplashAd,否则可能会出现广告填充问题
* ( 例如:mTTSplashAd = new TTSplashAd(this, mAdUnitId);)
* ( 例如:mTTSplashAd = new TTSplashAd(this, mAdUnitId);)
*/
*/
mTTSplashAd
=
new
TTSplashAd
(
this
,
mAdUnitId
);
mTTSplashAd
=
new
TTSplashAd
(
this
,
CsjGroMoreManager
.
AD_UNIT_SPLASH_ID
);
mTTSplashAd
.
setTTAdSplashListener
(
mSplashAdListener
);
mTTSplashAd
.
setTTAdSplashListener
(
mSplashAdListener
);
//step3:创建开屏广告请求参数AdSlot,具体参数含义参考文档
//step3:创建开屏广告请求参数AdSlot,具体参数含义参考文档
...
...
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