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
91f3515e
Commit
91f3515e
authored
Jun 01, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
信息流代码优化
parent
179cc79f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
47 deletions
+74
-47
ExpressManager.kt
...ain/java/com/mints/goodmoney/ad/express/ExpressManager.kt
+27
-0
CsjGroMoreVideoAdManager.java
...om/mints/goodmoney/ad/video/CsjGroMoreVideoAdManager.java
+21
-5
FoodSubsidyActivity.kt
...a/com/mints/goodmoney/ui/activitys/FoodSubsidyActivity.kt
+5
-8
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+6
-9
WalkActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
+5
-8
WaterActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
+5
-9
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+5
-8
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/express/ExpressManager.kt
0 → 100644
View file @
91f3515e
package
com.mints.goodmoney.ad.express
import
android.widget.FrameLayout
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.manager.TtCsjAdManager
/**
* 能用信息流加载
*/
object
ExpressManager
{
fun
loadExpress
()
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
}
else
{
TTPreLoadCarrierExpressManager
.
getInstance
().
loadTtFrameLayout
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_WATER
)
}
}
fun
getExpressFrameLayout
():
FrameLayout
?
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
return
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
}
else
{
return
TTPreLoadCarrierExpressManager
.
getInstance
().
ttFrameLayout
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/CsjGroMoreVideoAdManager.java
View file @
91f3515e
...
@@ -227,17 +227,33 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -227,17 +227,33 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_GROMORE
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_GROMORE
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_GROMORE
,
extraId
,
curCoin
));
HashMap
<
String
,
Object
>
voTemp
=
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_GROMORE
,
extraId
,
curCoin
);
if
(
mttRewardAd
!=
null
)
{
voTemp
.
put
(
"gromoreAdsource"
,
mttRewardAd
.
getAdNetworkRitId
());
}
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
voTemp
);
if
(
mttRewardAd
!=
null
)
{
if
(
mttRewardAd
!=
null
)
{
// LogUtil.d(TAG, "adNetworkPlatformId: " + mttRewardAd.getAdNetworkPlatformId()); //获取展示广告对应的adn的值 具体值见NetworkPlatformConst类 -3: 无权限 -2: 暂无数据
// LogUtil.d(TAG, "adNetworkPlatformId: " + mttRewardAd.getAdNetworkPlatformId()); //获取展示广告对应的adn的值 具体值见NetworkPlatformConst类 -3: 无权限 -2: 暂无数据
// LogUtil.d(TAG, "adNetworkRitId:" + mttRewardAd.getAdNetworkRitId()); //获取展示广告对应的代码位 具体值见NetworkPlatformConst类 "-3": 无权限 "-2"
// LogUtil.d(TAG, "adNetworkRitId:" + mttRewardAd.getAdNetworkRitId()); //获取展示广告对应的代码位 具体值见NetworkPlatformConst类 "-3": 无权限 "-2"
// LogUtil.d(TAG, "preEcpm: " + mttRewardAd.getPreEcpm()); //获取展示广告预估ecpm价格,单位是分 具体值见NetworkPlatformConst类 "-3": 无权限 "-2": 暂无数据 "-1":平台未有填写的预估ecpm价格
// LogUtil.d(TAG, "preEcpm: " + mttRewardAd.getPreEcpm()); //获取展示广告预估ecpm价格,单位是分 具体值见NetworkPlatformConst类 "-3": 无权限 "-2": 暂无数据 "-1":平台未有填写的预估ecpm价格
/**
* SDK_NAME_NO_PERMISSION = -3; //无权限
* * SDK_NAME_NO_DATA = -2; //暂无数据
* * SDK_NAME_PANGLE = 1;
* * SDK_NAME_ADMOB = 2;
* * SDK_NAME_GDT = 3;
* * SDK_NAME_MT = 4;
* * SDK_NAME_UNITY = 5;
* * SDK_NAME_BAIDU = 6;
* * SDK_NAME_KS = 7;
* * SDK_NAME_SIGMOB = 8;
*/
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mttRewardAd
.
getAdNetworkRitId
());
vo
.
put
(
"adcode"
,
mttRewardAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mttRewardAd
.
getPreEcpm
());
vo
.
put
(
"ecpm"
,
mttRewardAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mttRewardAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adSource"
,
mttRewardAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE2
);
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE2
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/FoodSubsidyActivity.kt
View file @
91f3515e
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ui.activitys
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.os.Bundle
import
android.view.View
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.
GroMoreCarrier
ExpressManager
import
com.mints.goodmoney.ad.express.ExpressManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.model.MealBean
import
com.mints.goodmoney.mvp.model.MealBean
import
com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter
import
com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter
...
@@ -88,7 +88,7 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
...
@@ -88,7 +88,7 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
// 预加载信息流
// 预加载信息流
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
ExpressManager
.
loadExpress
()
}
}
...
@@ -97,12 +97,9 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
...
@@ -97,12 +97,9 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
*/
*/
private
fun
initExpress
()
{
private
fun
initExpress
()
{
try
{
try
{
if
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
!=
null
)
{
if
(
flSubsidykAd
!=
null
)
{
if
(
flSubsidykAd
!=
null
)
{
flSubsidykAd
.
removeAllViews
()
flSubsidykAd
.
removeAllViews
()
flSubsidykAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
// flSubsidykAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flSubsidykAd
.
addView
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
())
}
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
91f3515e
...
@@ -5,11 +5,11 @@ import android.view.View
...
@@ -5,11 +5,11 @@ import android.view.View
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import
com.mints.goodmoney.ad.express.ExpressManager
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.MorningClockBean
import
com.mints.goodmoney.mvp.model.MorningClockBean
import
com.mints.goodmoney.mvp.model.VideoAdingBean
import
com.mints.goodmoney.mvp.model.VideoAdingBean
...
@@ -184,12 +184,9 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
...
@@ -184,12 +184,9 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
*/
*/
private
fun
initExpress
()
{
private
fun
initExpress
()
{
try
{
try
{
if
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
!=
null
)
{
if
(
flMorningClockAd
!=
null
)
{
if
(
flMorningClockAd
!=
null
)
{
flMorningClockAd
.
removeAllViews
()
flMorningClockAd
.
removeAllViews
()
flMorningClockAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
// flMorningClockAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flMorningClockAd
.
addView
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
())
}
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
View file @
91f3515e
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ui.activitys
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.os.Bundle
import
android.view.View
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.
GroMoreCarrier
ExpressManager
import
com.mints.goodmoney.ad.express.ExpressManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.model.WalkBean
import
com.mints.goodmoney.mvp.model.WalkBean
import
com.mints.goodmoney.mvp.presenters.WalkPresenter
import
com.mints.goodmoney.mvp.presenters.WalkPresenter
...
@@ -99,7 +99,7 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
...
@@ -99,7 +99,7 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
// 预加载信息流
// 预加载信息流
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
ExpressManager
.
loadExpress
()
}
}
/**
/**
...
@@ -107,12 +107,9 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
...
@@ -107,12 +107,9 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
*/
*/
private
fun
initExpress
()
{
private
fun
initExpress
()
{
try
{
try
{
if
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
!=
null
)
{
if
(
flWalkAd
!=
null
)
{
if
(
flWalkAd
!=
null
)
{
flWalkAd
.
removeAllViews
()
flWalkAd
.
removeAllViews
()
flWalkAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
// flWalkAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flWalkAd
.
addView
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
())
}
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
View file @
91f3515e
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ui.activitys
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.os.Bundle
import
android.view.View
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.
GroMoreCarrier
ExpressManager
import
com.mints.goodmoney.ad.express.ExpressManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.model.WaterBean
import
com.mints.goodmoney.mvp.model.WaterBean
import
com.mints.goodmoney.mvp.presenters.WaterPresenter
import
com.mints.goodmoney.mvp.presenters.WaterPresenter
...
@@ -68,8 +68,7 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
...
@@ -68,8 +68,7 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
}
}
// 预加载信息流
// 预加载信息流
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER)
ExpressManager
.
loadExpress
()
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
}
}
override
fun
clickForWaterSuc
(
waterCoin
:
Int
)
{
override
fun
clickForWaterSuc
(
waterCoin
:
Int
)
{
...
@@ -111,12 +110,9 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
...
@@ -111,12 +110,9 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
*/
*/
private
fun
initExpress
()
{
private
fun
initExpress
()
{
try
{
try
{
if
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
!=
null
)
{
if
(
flWaterAd
!=
null
)
{
if
(
flWaterAd
!=
null
)
{
flWaterAd
.
removeAllViews
()
flWaterAd
.
removeAllViews
()
flWaterAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
// flWaterAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flWaterAd
.
addView
(
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
())
}
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
91f3515e
...
@@ -19,10 +19,7 @@ import com.mints.goodmoney.BuildConfig
...
@@ -19,10 +19,7 @@ import com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import
com.mints.goodmoney.ad.express.*
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
...
@@ -1013,12 +1010,12 @@ class MyFragment : BaseFragment(),
...
@@ -1013,12 +1010,12 @@ class MyFragment : BaseFragment(),
readyGo
(
XiaomanActivity
::
class
.
java
,
bundle
)
readyGo
(
XiaomanActivity
::
class
.
java
,
bundle
)
}
}
Constant
.
HOT_ACTIVITY_WATER
->
{
Constant
.
HOT_ACTIVITY_WATER
->
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
ExpressManager
.
loadExpress
()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER)
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER)
readyGo
(
WaterActivity
::
class
.
java
)
readyGo
(
WaterActivity
::
class
.
java
)
}
}
Constant
.
HOT_ACTIVITY_WALK
->
{
Constant
.
HOT_ACTIVITY_WALK
->
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
ExpressManager
.
loadExpress
()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
readyGo
(
WalkActivity
::
class
.
java
)
readyGo
(
WalkActivity
::
class
.
java
)
}
}
...
@@ -1029,7 +1026,7 @@ class MyFragment : BaseFragment(),
...
@@ -1029,7 +1026,7 @@ class MyFragment : BaseFragment(),
readyGo
(
LiebaoGameActivity
::
class
.
java
)
readyGo
(
LiebaoGameActivity
::
class
.
java
)
}
}
Constant
.
HOT_ACTIVITY_MORNINGCLOCK
->
{
Constant
.
HOT_ACTIVITY_MORNINGCLOCK
->
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
ExpressManager
.
loadExpress
()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK)
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK)
readyGo
(
MorningClockActivity
::
class
.
java
)
readyGo
(
MorningClockActivity
::
class
.
java
)
}
}
...
@@ -1110,7 +1107,7 @@ class MyFragment : BaseFragment(),
...
@@ -1110,7 +1107,7 @@ class MyFragment : BaseFragment(),
readyGo
(
WrapperActivity
::
class
.
java
,
bundle
)
readyGo
(
WrapperActivity
::
class
.
java
,
bundle
)
}
}
Constant
.
HOT_ACTIVITY_EAT
->
{
Constant
.
HOT_ACTIVITY_EAT
->
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
ExpressManager
.
loadExpress
()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
readyGo
(
FoodSubsidyActivity
::
class
.
java
)
readyGo
(
FoodSubsidyActivity
::
class
.
java
)
}
}
...
...
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