Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
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_highgold
Commits
9bc2e2fd
Commit
9bc2e2fd
authored
Apr 17, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
穿山甲激励视频添加appip
parent
938fbeec
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
7 deletions
+37
-7
build.gradle
highgold/app/build.gradle
+2
-2
CsjVedioAdManager.java
...rc/main/java/com/mints/highgold/ad/CsjVedioAdManager.java
+6
-2
Constant.java
...app/src/main/java/com/mints/highgold/common/Constant.java
+3
-0
UserTaskMsgBean.java
...in/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
+5
-0
LoanService.java
...app/src/main/java/com/mints/highgold/net/LoanService.java
+1
-1
AwardActivity.java
...n/java/com/mints/highgold/ui/activitys/AwardActivity.java
+11
-0
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+6
-0
VersusFragment.java
...n/java/com/mints/highgold/ui/fragment/VersusFragment.java
+3
-2
No files found.
highgold/app/build.gradle
View file @
9bc2e2fd
...
@@ -10,8 +10,8 @@ android {
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.mints.highgold"
applicationId
"com.mints.highgold"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
2
versionCode
3
versionName
"1.0.
1
"
versionName
"1.0.
2
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
highgold/app/src/main/java/com/mints/highgold/ad/CsjVedioAdManager.java
View file @
9bc2e2fd
...
@@ -20,6 +20,7 @@ import com.mints.highgold.mvp.presenters.CsjVedioAdPresenter;
...
@@ -20,6 +20,7 @@ import com.mints.highgold.mvp.presenters.CsjVedioAdPresenter;
import
com.mints.highgold.mvp.views.LyVedioAdManagerView
;
import
com.mints.highgold.mvp.views.LyVedioAdManagerView
;
import
com.mints.highgold.ui.widgets.LoadingDialog
;
import
com.mints.highgold.ui.widgets.LoadingDialog
;
import
com.mints.highgold.utils.MD5
;
import
com.mints.highgold.utils.MD5
;
import
com.mints.highgold.utils.SPUtil
;
import
com.mints.highgold.utils.ToastUtil
;
import
com.mints.highgold.utils.ToastUtil
;
import
com.mints.library.utils.json.JsonUtil
;
import
com.mints.library.utils.json.JsonUtil
;
...
@@ -31,7 +32,7 @@ import java.util.HashMap;
...
@@ -31,7 +32,7 @@ import java.util.HashMap;
public
class
CsjVedioAdManager
implements
LyVedioAdManagerView
{
public
class
CsjVedioAdManager
implements
LyVedioAdManagerView
{
private
static
CsjVedioAdManager
_inst
;
private
static
CsjVedioAdManager
_inst
;
private
SPUtil
spUtil
;
private
int
curCoin
;
private
int
curCoin
;
private
String
extraId
;
private
String
extraId
;
private
CsjVedioAdPresenter
csjVedioAdPresenter
;
private
CsjVedioAdPresenter
csjVedioAdPresenter
;
...
@@ -61,7 +62,7 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
...
@@ -61,7 +62,7 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
private
void
init
(
Activity
activity
)
{
private
void
init
(
Activity
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
spUtil
=
SPUtil
.
getInstance
(
activity
);
userManager
=
UserManager
.
getInstance
();
userManager
=
UserManager
.
getInstance
();
TTNativeExpressManager
ttNativeExpressManager
=
new
TTNativeExpressManager
();
TTNativeExpressManager
ttNativeExpressManager
=
new
TTNativeExpressManager
();
...
@@ -318,6 +319,9 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
...
@@ -318,6 +319,9 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
vo
.
put
(
"adtype"
,
Constant
.
ADTYPE_VEDIO
);
vo
.
put
(
"adtype"
,
Constant
.
ADTYPE_VEDIO
);
vo
.
put
(
"tid"
,
tid
);
vo
.
put
(
"tid"
,
tid
);
vo
.
put
(
"adsource"
,
Constant
.
AD_SOURCE_CSJ
);
vo
.
put
(
"adsource"
,
Constant
.
AD_SOURCE_CSJ
);
if
(
spUtil
!=
null
)
{
vo
.
put
(
"ip"
,
spUtil
.
getString
(
Constant
.
CSJ_VEDIO_APPIP
));
}
switch
(
carrierType
)
{
switch
(
carrierType
)
{
case
Constant
.
CARRIER_VERSUS_VIDEO
:
// 每日任务-视频
case
Constant
.
CARRIER_VERSUS_VIDEO
:
// 每日任务-视频
...
...
highgold/app/src/main/java/com/mints/highgold/common/Constant.java
View file @
9bc2e2fd
...
@@ -270,4 +270,7 @@ public interface Constant {
...
@@ -270,4 +270,7 @@ public interface Constant {
String
HOT_ACTIVITY_CHB
=
"chb"
;
// 拆红包
String
HOT_ACTIVITY_CHB
=
"chb"
;
// 拆红包
String
HOT_ACTIVITY_SID
=
"hotNews"
;
// 新闻资讯
String
HOT_ACTIVITY_SID
=
"hotNews"
;
// 新闻资讯
// 穿山甲激励视频id
String
CSJ_VEDIO_APPIP
=
"csj_vedio_appip"
;
}
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
View file @
9bc2e2fd
...
@@ -75,6 +75,7 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -75,6 +75,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_csj_full_screen_video_surplus
;
private
int
vedioplan_csj_full_screen_video_surplus
;
private
String
loanUrl
;
private
String
loanUrl
;
private
String
appIp
;
// 穿山甲激励视频时传入
private
boolean
loanShow
;
private
boolean
loanShow
;
private
int
redPacketSecond
;
//一览视频 时间间隔 单位-秒
private
int
redPacketSecond
;
//一览视频 时间间隔 单位-秒
...
@@ -313,4 +314,8 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -313,4 +314,8 @@ public class UserTaskMsgBean implements Serializable {
public
int
getFirstGiveFriendCoin
()
{
public
int
getFirstGiveFriendCoin
()
{
return
firstGiveFriendCoin
;
return
firstGiveFriendCoin
;
}
}
public
String
getAppIp
()
{
return
appIp
;
}
}
}
highgold/app/src/main/java/com/mints/highgold/net/LoanService.java
View file @
9bc2e2fd
...
@@ -479,7 +479,7 @@ public interface LoanService {
...
@@ -479,7 +479,7 @@ public interface LoanService {
// if (BuildConfig.DEBUG) {
// if (BuildConfig.DEBUG) {
// SPUtil spUtil = SPUtil.getInstance(context);
// SPUtil spUtil = SPUtil.getInstance(context);
// if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
// if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
// spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/
gs-api
/");
// spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/
api-p1
/");
// }
// }
// retrofit = new Retrofit.Builder()
// retrofit = new Retrofit.Builder()
// .client(builder.build())
// .client(builder.build())
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/AwardActivity.java
View file @
9bc2e2fd
...
@@ -42,6 +42,7 @@ import com.mints.highgold.ui.widgets.countdowntimer.CountDownTimerSupport;
...
@@ -42,6 +42,7 @@ import com.mints.highgold.ui.widgets.countdowntimer.CountDownTimerSupport;
import
com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener
;
import
com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener
;
import
com.mints.highgold.utils.MD5
;
import
com.mints.highgold.utils.MD5
;
import
com.mints.highgold.utils.RxBus
;
import
com.mints.highgold.utils.RxBus
;
import
com.mints.highgold.utils.SPUtil
;
import
com.mints.highgold.utils.SoundPoolUtil
;
import
com.mints.highgold.utils.SoundPoolUtil
;
import
com.mints.highgold.utils.SpanUtils
;
import
com.mints.highgold.utils.SpanUtils
;
import
com.mints.highgold.utils.Utils
;
import
com.mints.highgold.utils.Utils
;
...
@@ -102,6 +103,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
...
@@ -102,6 +103,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
LinearLayout
llAwardBg
;
LinearLayout
llAwardBg
;
private
AwardPresenter
awardPresenter
;
private
AwardPresenter
awardPresenter
;
private
SPUtil
spUtil
;
// 穿山甲
// 穿山甲
private
boolean
isloadTTVedio
=
false
;
// true-加载视频,服务端回调决定
private
boolean
isloadTTVedio
=
false
;
// true-加载视频,服务端回调决定
...
@@ -144,6 +146,8 @@ public class AwardActivity extends BaseActivity implements AwardView {
...
@@ -144,6 +146,8 @@ public class AwardActivity extends BaseActivity implements AwardView {
awardPresenter
=
new
AwardPresenter
();
awardPresenter
=
new
AwardPresenter
();
awardPresenter
.
attachView
(
this
);
awardPresenter
.
attachView
(
this
);
spUtil
=
SPUtil
.
getInstance
(
getContext
());
if
(!
UserManager
.
getInstance
().
getAdShowFlag
())
{
if
(!
UserManager
.
getInstance
().
getAdShowFlag
())
{
tvAwardNext
.
setVisibility
(
View
.
GONE
);
tvAwardNext
.
setVisibility
(
View
.
GONE
);
flAwardAd
.
setVisibility
(
View
.
GONE
);
flAwardAd
.
setVisibility
(
View
.
GONE
);
...
@@ -1204,6 +1208,13 @@ public class AwardActivity extends BaseActivity implements AwardView {
...
@@ -1204,6 +1208,13 @@ public class AwardActivity extends BaseActivity implements AwardView {
vo
.
put
(
"detailAdtype"
,
detailAdtype
);
vo
.
put
(
"detailAdtype"
,
detailAdtype
);
}
}
// 穿山甲激励视频传入appid
if
(
TextUtils
.
equals
(
adsource
,
Constant
.
AD_SOURCE_CSJ
))
{
if
(
spUtil
!=
null
)
{
vo
.
put
(
"ip"
,
spUtil
.
getString
(
Constant
.
CSJ_VEDIO_APPIP
));
}
}
switch
(
carrierType
)
{
switch
(
carrierType
)
{
case
Constant
.
CARRIER_ONLINE_INCOME_DOUBLE
:
// 在线收益翻倍
case
Constant
.
CARRIER_ONLINE_INCOME_DOUBLE
:
// 在线收益翻倍
vo
.
put
(
"page"
,
Constant
.
PAGE_ONE
);
vo
.
put
(
"page"
,
Constant
.
PAGE_ONE
);
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
9bc2e2fd
...
@@ -566,6 +566,9 @@ public class MainFragment extends BaseFragment
...
@@ -566,6 +566,9 @@ public class MainFragment extends BaseFragment
showNewUserGift
();
showNewUserGift
();
}
}
// 保存穿山甲激励视频ip
spUtil
.
putString
(
Constant
.
CSJ_VEDIO_APPIP
,
data
.
getAppIp
());
// 设置随机广告权重
// 设置随机广告权重
if
(
vedioAdingManager
!=
null
)
{
if
(
vedioAdingManager
!=
null
)
{
vedioAdingManager
.
initAdWeight
(
data
.
getVedioplan_csj_vedio_rate
(),
data
.
getVedioplan_liyan_vedio_rate
(),
data
.
getVedioplan_lyh_vedio_rate
(),
data
.
getVedioplan_csj_full_screen_video_rate
());
vedioAdingManager
.
initAdWeight
(
data
.
getVedioplan_csj_vedio_rate
(),
data
.
getVedioplan_liyan_vedio_rate
(),
data
.
getVedioplan_lyh_vedio_rate
(),
data
.
getVedioplan_csj_full_screen_video_rate
());
...
@@ -1643,6 +1646,9 @@ public class MainFragment extends BaseFragment
...
@@ -1643,6 +1646,9 @@ public class MainFragment extends BaseFragment
}
}
vo
.
put
(
"adtype"
,
Constant
.
ADTYPE_VEDIO
);
vo
.
put
(
"adtype"
,
Constant
.
ADTYPE_VEDIO
);
vo
.
put
(
"tid"
,
tid
);
vo
.
put
(
"tid"
,
tid
);
if
(
spUtil
!=
null
)
{
vo
.
put
(
"ip"
,
spUtil
.
getString
(
Constant
.
CSJ_VEDIO_APPIP
));
}
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/VersusFragment.java
View file @
9bc2e2fd
...
@@ -1951,8 +1951,9 @@ public class VersusFragment extends BaseFragment
...
@@ -1951,8 +1951,9 @@ public class VersusFragment extends BaseFragment
vo
.
put
(
"block"
,
Constant
.
BLOCK_TWO
);
vo
.
put
(
"block"
,
Constant
.
BLOCK_TWO
);
vo
.
put
(
"order"
,
Constant
.
ORDER_TWO
);
vo
.
put
(
"order"
,
Constant
.
ORDER_TWO
);
}
}
if
(
spUtil
!=
null
)
{
vo
.
put
(
"ip"
,
spUtil
.
getString
(
Constant
.
CSJ_VEDIO_APPIP
));
}
vo
.
put
(
"tid"
,
tid
);
vo
.
put
(
"tid"
,
tid
);
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
//step4:创建广告请求参数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