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
38c37a5a
Commit
38c37a5a
authored
Jan 29, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化首页微转来电秀标记切换,cpd界面优化
parent
23cfb489
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
743 deletions
+48
-743
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+0
-3
CoralDownload.java
...n/java/com/mints/goodmoney/ad/download/CoralDownload.java
+9
-9
CpdManager.kt
...p/src/main/java/com/mints/goodmoney/manager/CpdManager.kt
+2
-1
KylVideoActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
+0
-4
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+5
-1
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+0
-697
TaskCpdActivity.kt
.../java/com/mints/goodmoney/ui/activitys/TaskCpdActivity.kt
+1
-0
TaskCpdFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
+30
-28
item_fragment_main_my_title.xml
...y/app/src/main/res/layout/item_fragment_main_my_title.xml
+1
-0
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
38c37a5a
...
...
@@ -209,9 +209,6 @@
<activity
android:name=
".ui.activitys.XmlyPlayActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.TaskActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.TaskCpdActivity"
android:screenOrientation=
"portrait"
/>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/download/CoralDownload.java
View file @
38c37a5a
...
...
@@ -208,9 +208,9 @@ public final class CoralDownload {
@Override
public
boolean
onAppDownloaded
(
@Nullable
CoralAD
ad
,
@Nullable
String
downloadUrl
,
@Nullable
String
localFile
)
{
LogUtil
.
d
(
"onAppDownloaded"
);
if
(
mOnAdLoadListener
!=
null
)
{
mOnAdLoadListener
.
onSDKDownloaded
();
}
//
if (mOnAdLoadListener != null) {
//
mOnAdLoadListener.onSDKDownloaded();
//
}
return
false
;
}
...
...
@@ -228,9 +228,9 @@ public final class CoralDownload {
public
boolean
onAppInstalled
(
@Nullable
CoralAD
ad
,
@Nullable
String
downloadUrl
,
@Nullable
String
localFile
)
{
LogUtil
.
d
(
"onAppInstalled"
);
if
(
mOnAdLoadListener
!=
null
)
{
mOnAdLoadListener
.
onSDKInstalled
();
}
//
if (mOnAdLoadListener != null) {
//
mOnAdLoadListener.onSDKInstalled();
//
}
return
false
;
}
...
...
@@ -270,9 +270,9 @@ public final class CoralDownload {
void
onSDKDownloadStart
();
void
onSDKDownloaded
();
void
onSDKInstalled
();
//
void onSDKDownloaded();
//
//
void onSDKInstalled();
void
onGetDownloadProcess
(
DownloadProcess
downloadProcess
);
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/CpdManager.kt
View file @
38c37a5a
package
com.mints.goodmoney.manager
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.net.CpdService
import
com.mints.goodmoney.utils.MD5
...
...
@@ -37,7 +38,7 @@ object CpdManager {
val
application
=
JSONObject
()
val
equipment
=
JSONObject
()
try
{
application
.
put
(
"app_pkg_name"
,
"com.mints.goodmoney"
)
application
.
put
(
"app_pkg_name"
,
Constant
.
MINTS_PKG_NAME
)
application
.
put
(
"app_ver_code"
,
deviceInfo
.
versionCode
)
application
.
put
(
"app_ver_name"
,
deviceInfo
.
versionName
)
// 设备类型 4-手机
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
View file @
38c37a5a
...
...
@@ -36,7 +36,6 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
const
val
VIDEO_ID
=
"video_id"
}
//https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId=1251065712248619008
private
val
WEB_VEDIO_URL
=
"https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId="
private
lateinit
var
videoUrl
:
String
...
...
@@ -215,9 +214,6 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
showToast
(
"视频处理中,请稍候"
)
return
}
// DetailActivity.startSelf(this@KylVideoActivity, vedioPathName)
// finish()
readyGo
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
38c37a5a
...
...
@@ -42,6 +42,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
private
var
currentFragment
:
Fragment
?
=
null
private
var
isMainShowWz
:
Boolean
=
false
// 是否显示来电秀,防止线程不一样
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_main
override
fun
initViewsAndEvents
()
{
...
...
@@ -65,9 +67,11 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
if
(
AppConfig
.
isMainShowWz
)
{
tab_iv_four
.
setImageResource
(
R
.
drawable
.
tab_wz_share_btn
)
tab_tv_four
.
text
=
"新闻分享"
isMainShowWz
=
true
}
else
{
tab_iv_four
.
setImageResource
(
R
.
drawable
.
tab_bell_btn
)
tab_tv_four
.
text
=
"来电秀"
isMainShowWz
=
false
}
tab_iv_one
.
isSelected
=
true
...
...
@@ -207,7 +211,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
fun
clickTab4Layout
()
{
// 是否显示微转
if
(
AppConfig
.
isMainShowWz
)
{
if
(
isMainShowWz
)
{
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_FOUR
if
(
wzFragment
==
null
)
{
wzFragment
=
WzFragment
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
deleted
100644 → 0
View file @
23cfb489
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskCpdActivity.kt
View file @
38c37a5a
...
...
@@ -95,4 +95,5 @@ class TaskCpdActivity : BaseActivity(), View.OnClickListener {
cdaa
.
setRight
(
"确定"
)
cdaa
.
show
()
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
View file @
38c37a5a
...
...
@@ -41,6 +41,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
OnItemChildClickListener
,
DownloadApkManager
.
OnMyDownloadListener
{
private
val
TAG
=
TaskCpdFragment
::
class
.
java
.
simpleName
private
val
taskPresenter
by
lazy
{
TaskPresenter
()
}
private
var
mTaskAdapter
:
TaskAdapter
?
=
null
...
...
@@ -60,13 +62,13 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 试完时间不足弹窗
private
var
tryTimeOut
=
false
// 第二次拉取重复不拉取
//
圣于地
第二次拉取重复不拉取
private
var
isTwiceGetCpd
=
false
private
val
outNetIp
by
lazy
{
SPUtil
.
getInstance
().
getString
(
Constant
.
OUT_NET_IP
)
}
private
var
mCoin
=
0
private
var
needUseTime
=
-
1
private
var
needUseTime
=
-
1
// 应用试玩时间
private
var
shMax
=
3
//珊瑚 广告最大填充数
private
var
cpdMax
=
3
//CPD 广告最大填充数
...
...
@@ -88,6 +90,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
private
fun
loadCPDData
()
{
LogUtil
.
d
(
TAG
,
"syd loadCPDData"
)
taskPresenter
.
getCpdDetail
(
outNetIp
)
}
...
...
@@ -139,18 +142,16 @@ class TaskCpdFragment : BaseFragment(), TaskView,
if
((
shMax
+
cpdMax
)
<=
0
)
{
hideLoading
()
showToast
(
"今日任务已完成,请明日再试"
)
// finish()
return
}
isTwiceGetCpd
=
false
shLoadCountTime
=
0
cpdLoadCountTime
=
0
mFakeTaskList
.
clear
()
if
(
shMax
>
0
&&
(
cpdMax
>
0
||
cpdMax
==
0
))
{
if
(
shMax
>
0
)
{
// 先加载珊瑚广告,珊瑚回调判断圣于地
for
(
i
in
0
until
shMax
)
{
mCoralDownload
?.
pull
()
}
...
...
@@ -158,10 +159,14 @@ class TaskCpdFragment : BaseFragment(), TaskView,
for
(
i
in
0
until
cpdMax
)
{
loadCPDData
()
}
}
else
{
notifyDataAndShowAd
()
}
}
override
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
{
LogUtil
.
d
(
TAG
,
"syd getCpdModelSuc"
)
for
(
material
in
dataBean
.
materials
)
{
val
tzTaskBean
=
TzTaskBean
(
material
.
icons
,
material
.
title
,
material
.
description
,
false
,
mCoin
,
0
,
material
.
app_apk_name
)
tzTaskBean
.
app_url
=
material
.
app_url
...
...
@@ -169,13 +174,17 @@ class TaskCpdFragment : BaseFragment(), TaskView,
mFakeTaskList
.
add
(
tzTaskBean
)
}
//
多拉取的CPD广告
//
圣于地广告 循环完成后去重
if
(
cpdLoadCountTime
++
>=
cpdMax
-
1
)
{
getCpdRepeatPkg
()
notifyDataAndShowAd
()
// getCpdRepeatPkg()
}
}
override
fun
getCpdModelFail
()
{
LogUtil
.
d
(
TAG
,
"syd getCpdModelFail"
)
if
(
cpdLoadCountTime
++
>=
cpdMax
-
1
)
{
notifyDataAndShowAd
()
}
...
...
@@ -190,9 +199,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
*/
private
fun
getCpdRepeatPkg
()
{
if
(
isTwiceGetCpd
)
{
if
(
cpdLoadCountTime
>=
cpdMax
)
{
notifyDataAndShowAd
()
}
notifyDataAndShowAd
()
return
}
...
...
@@ -221,7 +228,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
if
(
flag
)
{
//
是否已经安装此
app
//
添加未安装
app
if
(!
DeviceInfo
.
instance
.
isLoadingPkg
(
mFakeTaskList
[
i
].
currentPkgName
))
{
cpdLoadCountTime
--
newPkgData
.
add
(
mFakeTaskList
[
i
])
...
...
@@ -244,15 +251,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
for
(
i
in
0
until
cpdLoadCountTime
)
{
loadCPDData
()
}
cpdLoadCountTime
=
cpdMax
-
cpdLoadCountTime
return
}
else
{
notifyDataAndShowAd
()
}
}
})
}
...
...
@@ -268,6 +272,13 @@ class TaskCpdFragment : BaseFragment(), TaskView,
iv_empty
.
visibility
=
View
.
GONE
}
uploadSydImp
()
}
/**
* 上报圣于地展示
*/
private
fun
uploadSydImp
()
{
for
(
tzTaskBean
in
mFakeTaskList
)
{
if
(!
tzTaskBean
.
isShCpd
)
{
...
...
@@ -283,6 +294,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
override
fun
onLoadSuccess
(
dataList
:
MutableList
<
CoralAD
>?)
{
LogUtil
.
d
(
TAG
,
"shanhu onLoadSuccess times"
)
dataList
?.
let
{
for
(
coralAD
in
it
)
{
val
tzTaskBean
=
TzTaskBean
(
coralAD
.
icon
,
coralAD
.
title
,
coralAD
.
description
,
true
,
mCoin
,
0
,
null
)
...
...
@@ -291,8 +303,9 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
}
//
多拉取的
广告
//
珊瑚循环完成后 调用圣于地
广告
if
(
shLoadCountTime
++
>=
shMax
-
1
)
{
LogUtil
.
d
(
TAG
,
"shanhu onLoadSuccess"
)
if
(
cpdMax
==
0
)
{
notifyDataAndShowAd
()
return
...
...
@@ -325,16 +338,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
registerBroad
()
}
override
fun
onSDKDownloaded
()
{
// SDK上报下载完成
// mDownloadProcess?.reportDownloadSuccess(localFilePath, false)
}
override
fun
onSDKInstalled
()
{
// SDK上报安装完成
// mDownloadProcess?.reportInstallSuccess(false)
}
override
fun
onGetDownloadProcess
(
downloadProcess
:
DownloadProcess
?)
{
// 点击之后回调下载数据
mDownloadProcess
=
downloadProcess
...
...
@@ -356,7 +359,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
taskPresenter
.
detachView
()
super
.
onDestroy
()
}
...
...
@@ -404,7 +406,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
//
finish()
activity
?.
finish
()
}
3
->
{
showToast
(
"当前任务已完成,试试其他任务吧!"
)
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
38c37a5a
...
...
@@ -50,6 +50,7 @@
android:layout_height=
"wrap_content"
android:drawableTop=
"@mipmap/ic_friends"
android:text=
"平台分红"
android:textStyle=
"bold"
android:layout_centerVertical=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
...
...
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