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
d9e4b90f
Commit
d9e4b90f
authored
May 17, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TopOn 激励视频对接
parent
17ae2018
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
169 additions
and
11 deletions
+169
-11
build.gradle
GoodMoney/app/build.gradle
+11
-0
anythink_china_core.aar
GoodMoney/app/libs/anythink_china_core.aar
+0
-0
anythink_core.aar
GoodMoney/app/libs/anythink_core.aar
+0
-0
anythink_network_pangle_china.aar
GoodMoney/app/libs/anythink_network_pangle_china.aar
+0
-0
anythink_rewardvideo.aar
GoodMoney/app/libs/anythink_rewardvideo.aar
+0
-0
tramini_sdk.aar
GoodMoney/app/libs/tramini_sdk.aar
+0
-0
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+5
-1
TopOnVideoAdManager.kt
.../java/com/mints/goodmoney/ad/video/TopOnVideoAdManager.kt
+116
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+1
-0
TopOnManager.kt
...src/main/java/com/mints/goodmoney/manager/TopOnManager.kt
+29
-0
AboutusActivity.kt
.../java/com/mints/goodmoney/ui/activitys/AboutusActivity.kt
+7
-10
No files found.
GoodMoney/app/build.gradle
View file @
d9e4b90f
...
...
@@ -352,10 +352,21 @@ dependencies {
transitive
=
true
changing
=
true
}
//愉悦赚
implementation
(
name:
'mduisdk_v3.1.0.18_support_msa_1.0.23'
,
ext:
'aar'
)
implementation
'com.tencent.tbs.tbssdk:sdk:43903'
// TopOn 聚合平台
implementation
(
name:
'anythink_china_core'
,
ext:
'aar'
)
implementation
(
name:
'anythink_core'
,
ext:
'aar'
)
implementation
(
name:
'anythink_interstitial'
,
ext:
'aar'
)
implementation
(
name:
'anythink_native'
,
ext:
'aar'
)
implementation
(
name:
'anythink_network_pangle_china'
,
ext:
'aar'
)
implementation
(
name:
'anythink_rewardvideo'
,
ext:
'aar'
)
implementation
(
name:
'anythink_splash'
,
ext:
'aar'
)
implementation
(
name:
'tramini_sdk'
,
ext:
'aar'
)
// //芒果联盟
// implementation 'com.openppeace.mgmob:mgmob:1.3.5-alpha6'//MGMob
...
...
GoodMoney/app/libs/anythink_china_core.aar
0 → 100755
View file @
d9e4b90f
File added
GoodMoney/app/libs/anythink_core.aar
0 → 100755
View file @
d9e4b90f
File added
GoodMoney/app/libs/anythink_network_pangle_china.aar
0 → 100755
View file @
d9e4b90f
File added
GoodMoney/app/libs/anythink_rewardvideo.aar
0 → 100755
View file @
d9e4b90f
File added
GoodMoney/app/libs/tramini_sdk.aar
0 → 100755
View file @
d9e4b90f
File added
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
d9e4b90f
...
...
@@ -18,6 +18,7 @@ import com.mints.goodmoney.manager.MhManager;
import
com.mints.goodmoney.manager.MiitHelper
;
import
com.mints.goodmoney.manager.ReaderManager
;
import
com.mints.goodmoney.manager.RsNewsManager
;
import
com.mints.goodmoney.manager.TopOnManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.TzManager
;
import
com.mints.goodmoney.manager.WnManager
;
...
...
@@ -114,7 +115,7 @@ public class MintsApplication extends MultiDexApplication {
private
void
thirdConfig
()
{
// 友盟SDK预初始化函数
// preInit预初始化函数耗时极少,不会影响App首次冷启动用户体验
UMConfigure
.
preInit
(
this
,
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"UMENG_KEY"
),
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
));
UMConfigure
.
preInit
(
this
,
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"UMENG_KEY"
),
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
));
// 初始化toast
initToast
();
...
...
@@ -152,6 +153,9 @@ public class MintsApplication extends MultiDexApplication {
// 瑞狮新闻
RsNewsManager
.
INSTANCE
.
init
(
this
);
// TopOn
TopOnManager
.
INSTANCE
.
init
(
this
);
// 喜马拉雅
initXmly
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/TopOnVideoAdManager.kt
0 → 100644
View file @
d9e4b90f
package
com.mints.goodmoney.ad.video
import
android.app.Activity
import
com.anythink.core.api.ATAdConst
import
com.anythink.core.api.ATAdInfo
import
com.anythink.core.api.AdError
import
com.anythink.rewardvideo.api.ATRewardVideoAd
import
com.anythink.rewardvideo.api.ATRewardVideoExListener
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TopOnManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.utils.LogUtil
import
java.util.*
private
val
TAG
=
TopOnVideoAdManager
::
class
.
java
.
simpleName
/**
* TopOn 广告视频
*/
class
TopOnVideoAdManager
:
BaseVideoAd
()
{
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
var
isClickScreen
:
Boolean
=
true
companion
object
{
val
INSTANCE
:
TopOnVideoAdManager
by
lazy
(
mode
=
LazyThreadSafetyMode
.
SYNCHRONIZED
)
{
TopOnVideoAdManager
()
}
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
isClickScreen
=
true
val
rewardVideoAd
=
ATRewardVideoAd
(
activity
,
TopOnManager
.
TOPPN_REWARD_VIDEO_ID
)
val
userid
=
"test_userid_001"
val
userdata
=
"test_userdata_001"
val
localMap
:
MutableMap
<
String
,
Any
>
=
HashMap
()
localMap
[
ATAdConst
.
KEY
.
USER_ID
]
=
userid
localMap
[
ATAdConst
.
KEY
.
USER_CUSTOM_DATA
]
=
userdata
rewardVideoAd
.
setLocalExtra
(
localMap
)
rewardVideoAd
.
setAdListener
(
object
:
ATRewardVideoExListener
{
override
fun
onRewardedVideoAdClosed
(
p0
:
ATAdInfo
?)
{
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_TOPON
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_TOPON
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
videoAdStatusListener
?.
adSuccess
()
}
override
fun
onReward
(
p0
:
ATAdInfo
?)
{
p0
?.
networkPlacementId
LogUtil
.
d
(
p0
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
}
override
fun
onRewardedVideoAdPlayFailed
(
p0
:
AdError
?,
p1
:
ATAdInfo
?)
{
}
override
fun
onRewardedVideoAdLoaded
()
{
rewardVideoAd
.
show
(
activity
)
}
override
fun
onRewardedVideoAdPlayStart
(
p0
:
ATAdInfo
?)
{
}
override
fun
onRewardedVideoAdFailed
(
p0
:
AdError
?)
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ONE
,
p0
?.
code
,
p0
?.
desc
)
videoAdStatusListener
?.
adFail
()
}
override
fun
onDeeplinkCallback
(
p0
:
ATAdInfo
?,
p1
:
Boolean
)
{
}
override
fun
onRewardedVideoAdPlayEnd
(
p0
:
ATAdInfo
?)
{
}
override
fun
onRewardedVideoAdPlayClicked
(
p0
:
ATAdInfo
?)
{
if
(
AppConfig
.
needReportClickAdEvent
)
{
TrackManager
.
getInstance
().
reportClickAdEvent
()
}
LogUtil
.
d
(
TAG
,
"onADClick"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_TOPON
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_TOPON
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
videoAdStatusListener
?.
adDownload
()
}
})
rewardVideoAd
.
load
()
}
fun
setVideoAdStatusListener
(
videoAdStatusListener
:
VideoAdStatusListener
?)
{
this
.
videoAdStatusListener
=
videoAdStatusListener
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
d9e4b90f
...
...
@@ -155,6 +155,7 @@ object Constant {
const
val
AD_SOURCE_SH
=
"CORAL"
//珊瑚天卓
const
val
AD_SOURCE_KS
=
"KS"
//快手
const
val
AD_SOURCE_RTA
=
"RTA"
//RTA
const
val
AD_SOURCE_TOPON
=
"TOPON"
//RTA
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const
val
EVENT_TYPE_ZERO
=
"0"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TopOnManager.kt
0 → 100644
View file @
d9e4b90f
package
com.mints.goodmoney.manager
import
android.app.Application
import
com.anythink.core.api.ATSDK
import
com.mints.goodmoney.BuildConfig
/**
* 描述:TopOn聚合平台
*/
object
TopOnManager
{
private
const
val
TOPPN_APP_ID
=
"a5aa1f9deda26d"
private
const
val
TOPPN_APP_KEY
=
"4f7b9ac17decb9babec83aac078742c7"
const
val
TOPPN_REWARD_VIDEO_ID
=
"b5b449fb3d89d7"
/**
*
* TopOn init
*/
fun
init
(
application
:
Application
)
{
if
(
BuildConfig
.
DEBUG
)
{
ATSDK
.
setNetworkLogDebug
(
true
)
}
ATSDK
.
init
(
application
,
TOPPN_APP_ID
,
TOPPN_APP_KEY
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AboutusActivity.kt
View file @
d9e4b90f
...
...
@@ -3,22 +3,17 @@ package com.mints.goodmoney.ui.activitys
import
android.annotation.SuppressLint
import
android.os.Bundle
import
android.view.View
import
android.widget.FrameLayout
import
android.widget.ImageView
import
com.bytedance.hume.readapk.HumeSDK
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.
banner.Banner
Manager
import
com.mints.goodmoney.ad.
video.TopOnVideoAd
Manager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.adapter.AdBannerAdapter
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.ConstantUtil
import
kotlinx.android.synthetic.main.activity_aboutus.*
import
kotlinx.android.synthetic.main.fragment_main_my.*
import
kotlinx.android.synthetic.main.header_layout.*
/**
...
...
@@ -54,10 +49,12 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
when
(
v
?.
id
)
{
R
.
id
.
iv_left_icon
->
finish
()
R
.
id
.
tvAboutasService
->
{
val
bundle
=
Bundle
()
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
getString
(
R
.
string
.
register_name
))
bundle
.
putString
(
WebActivity
.
WEB_URL
,
Constant
.
REGISTER_URL
)
readyGo
(
WebActivity
::
class
.
java
,
bundle
)
// val bundle = Bundle()
// bundle.putString(WebActivity.WEB_TITLE, getString(R.string.register_name))
// bundle.putString(WebActivity.WEB_URL, Constant.REGISTER_URL)
// readyGo(WebActivity::class.java, bundle)
TopOnVideoAdManager
.
INSTANCE
.
loadAd
(
this
,
0
,
""
,
""
)
}
R
.
id
.
tvAboutasPolicy
->
{
val
bundle
=
Bundle
()
...
...
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