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
e385dc3c
Commit
e385dc3c
authored
May 26, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加流量配置
parent
606a7d0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
proguard-rules.pro
GoodMoney/app/proguard-rules.pro
+10
-0
CsjGroMoreVideoAdManager.java
...om/mints/goodmoney/ad/video/CsjGroMoreVideoAdManager.java
+1
-9
TTGroMoreAdManagerHolder.java
...com/mints/goodmoney/manager/TTGroMoreAdManagerHolder.java
+8
-5
No files found.
GoodMoney/app/proguard-rules.pro
View file @
e385dc3c
...
@@ -830,6 +830,16 @@
...
@@ -830,6 +830,16 @@
-keep class com.baidu.mobad.
*
* { *; }
-keep class com.baidu.mobad.
*
* { *; }
-keep class com.bun.miitmdid.core.
*
* {*;}
-keep class com.bun.miitmdid.core.
*
* {*;}
#ks 快手 不接入ks sdk可以不引入
-keep class org.chromium.
*
* {*;}
-keep class org.chromium.
*
* { *; }
-keep class aegon.chrome.
*
* { *; }
-keep class com.kwai.
*
*{ *; }
-dontwarn com.kwai.
*
*
-dontwarn com.kwad.
*
*
-dontwarn com.ksad.
*
*
-dontwarn aegon.chrome.
*
*
# Admob 不接入admob sdk可以不引入
# Admob 不接入admob sdk可以不引入
-keep class com.google.android.gms.ads.MobileAds {
-keep class com.google.android.gms.ads.MobileAds {
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/CsjGroMoreVideoAdManager.java
View file @
e385dc3c
...
@@ -43,7 +43,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -43,7 +43,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private
static
final
String
TAG
=
CsjGroMoreVideoAdManager
.
class
.
getSimpleName
();
private
static
final
String
TAG
=
CsjGroMoreVideoAdManager
.
class
.
getSimpleName
();
private
static
CsjGroMoreVideoAdManager
_inst
;
private
static
CsjGroMoreVideoAdManager
_inst
;
private
AppPreferences
ps
;
private
int
curCoin
;
private
int
curCoin
;
private
String
extraId
;
private
String
extraId
;
private
String
carrierType
;
private
String
carrierType
;
...
@@ -52,7 +51,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -52,7 +51,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private
TTRewardAd
mttRewardAd
;
private
TTRewardAd
mttRewardAd
;
Activity
activity
;
Activity
activity
;
private
UserManager
userManager
;
private
String
adUnitId
=
"946018378"
;
private
String
adUnitId
=
"946018378"
;
...
@@ -71,8 +69,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -71,8 +69,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private
void
init
(
Activity
activity
)
{
private
void
init
(
Activity
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
ps
=
new
AppPreferences
(
activity
);
userManager
=
UserManager
.
getInstance
();
}
}
...
@@ -83,7 +79,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -83,7 +79,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
mttRewardAd
.
destroy
();
mttRewardAd
.
destroy
();
}
}
ps
=
null
;
activity
=
null
;
activity
=
null
;
}
}
...
@@ -140,11 +135,8 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
...
@@ -140,11 +135,8 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
//创建广告请求参数AdSlot,具体参数含义参考文档
//创建广告请求参数AdSlot,具体参数含义参考文档
com
.
bytedance
.
msdk
.
api
.
AdSlot
.
Builder
adSlotBuilder
=
new
com
.
bytedance
.
msdk
.
api
.
AdSlot
.
Builder
()
com
.
bytedance
.
msdk
.
api
.
AdSlot
.
Builder
adSlotBuilder
=
new
com
.
bytedance
.
msdk
.
api
.
AdSlot
.
Builder
()
.
setTTVideoOption
(
videoOption
)
.
setTTVideoOption
(
videoOption
)
.
setRewardName
(
"金币"
)
//奖励的名称
.
setUserID
(
UserManager
.
getInstance
().
getUserID
())
//用户id,必传参数
.
setRewardAmount
(
3
)
//奖励的数量
.
setUserID
(
"user123"
)
//用户id,必传参数
.
setAdStyleType
(
AdSlot
.
TYPE_EXPRESS_AD
)
// 确保该聚合广告位下所有gdt代码位都是同一种类型(模版或非模版)。
.
setAdStyleType
(
AdSlot
.
TYPE_EXPRESS_AD
)
// 确保该聚合广告位下所有gdt代码位都是同一种类型(模版或非模版)。
.
setCustomData
(
customData
)
// 激励视频开启服务端验证时,透传给adn的自定义数据。
.
setOrientation
(
orientation
);
//必填参数,期望视频的播放方向:TTAdConstant.HORIZONTAL 或 TTAdConstant.VERTICAL
.
setOrientation
(
orientation
);
//必填参数,期望视频的播放方向:TTAdConstant.HORIZONTAL 或 TTAdConstant.VERTICAL
//请求广告
//请求广告
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TTGroMoreAdManagerHolder.java
View file @
e385dc3c
...
@@ -4,12 +4,15 @@ import android.app.Activity;
...
@@ -4,12 +4,15 @@ import android.app.Activity;
import
android.content.Context
;
import
android.content.Context
;
import
android.provider.Settings
;
import
android.provider.Settings
;
import
com.bytedance.hume.readapk.HumeSDK
;
import
com.bytedance.msdk.api.TTAdConfig
;
import
com.bytedance.msdk.api.TTAdConfig
;
import
com.bytedance.msdk.api.TTAdConstant
;
import
com.bytedance.msdk.api.TTAdConstant
;
import
com.bytedance.msdk.api.TTMediationAdSdk
;
import
com.bytedance.msdk.api.TTMediationAdSdk
;
import
com.bytedance.msdk.api.UserInfoForSegment
;
import
com.bytedance.msdk.api.UserInfoForSegment
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.library.utils.CommonUtils
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -44,16 +47,16 @@ public class TTGroMoreAdManagerHolder {
...
@@ -44,16 +47,16 @@ public class TTGroMoreAdManagerHolder {
private
static
TTAdConfig
buildConfig
(
Context
context
)
{
private
static
TTAdConfig
buildConfig
(
Context
context
)
{
UserInfoForSegment
userInfo
=
new
UserInfoForSegment
();
UserInfoForSegment
userInfo
=
new
UserInfoForSegment
();
userInfo
.
setUserId
(
"msdk demo"
);
userInfo
.
setUserId
(
UserManager
.
getInstance
().
getUserID
()
);
userInfo
.
setGender
(
UserInfoForSegment
.
GENDER_UNKNOWN
);
userInfo
.
setGender
(
UserInfoForSegment
.
GENDER_UNKNOWN
);
userInfo
.
setChannel
(
"msdk channel"
);
userInfo
.
setChannel
(
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
);
userInfo
.
setSubChannel
(
"msdk sub channel"
);
userInfo
.
setSubChannel
(
HumeSDK
.
getChannel
(
MintsApplication
.
getContext
())
);
userInfo
.
setAge
(
999
);
userInfo
.
setAge
(
999
);
userInfo
.
setUserValueGroup
(
"msdk demo user value group"
);
userInfo
.
setUserValueGroup
(
"msdk demo user value group"
);
Map
<
String
,
String
>
customInfos
=
new
HashMap
<>();
Map
<
String
,
String
>
customInfos
=
new
HashMap
<>();
customInfos
.
put
(
"aaaa"
,
"test111"
);
//
customInfos.put("aaaa", "test111");
customInfos
.
put
(
"bbbb"
,
"test222"
);
//
customInfos.put("bbbb", "test222");
userInfo
.
setCustomInfos
(
customInfos
);
userInfo
.
setCustomInfos
(
customInfos
);
return
new
TTAdConfig
.
Builder
()
return
new
TTAdConfig
.
Builder
()
.
appId
(
TT_AD_APPID
)
//必填 ,不能为空
.
appId
(
TT_AD_APPID
)
//必填 ,不能为空
...
...
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