Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold_pro
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_pro
Commits
11b52bac
Commit
11b52bac
authored
Mar 09, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
46d9c269
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
83 deletions
+40
-83
build.gradle
app/build.gradle
+1
-1
KsPreLoadExpressManager.kt
...com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
+2
-3
KsVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
+1
-2
ShVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/ShVideoAdManager.kt
+1
-1
Constant.kt
app/src/main/java/com/mints/goldspace/common/Constant.kt
+1
-0
KsManager.kt
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
+2
-1
CsjFullVedioAdPresenter.kt
...mints/goldspace/mvp/presenters/CsjFullVedioAdPresenter.kt
+0
-37
MhVedioAdPresenter.kt
.../com/mints/goldspace/mvp/presenters/MhVedioAdPresenter.kt
+0
-37
AwardActivity.kt
...in/java/com/mints/goldspace/ui/activitys/AwardActivity.kt
+2
-1
MainMyAdapter.kt
...main/java/com/mints/goldspace/ui/adapter/MainMyAdapter.kt
+3
-0
MyFragment.kt
...c/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
+27
-0
No files found.
app/build.gradle
View file @
11b52bac
...
...
@@ -210,7 +210,7 @@ dependencies {
implementation
'com.umeng.umsdk:crash:0.0.4'
// native crash包依赖(必选)
// TalkingDada(已集成)
// 一览视频
implementation
(
"com.yilan.sdk:ui:3.3.1.
2
"
)
{
implementation
(
"com.yilan.sdk:ui:3.3.1.
8
"
)
{
exclude
group:
'com.yilan.sdk'
,
module:
'yb_extra'
exclude
group:
'com.yilan.sdk'
,
module:
'gdt'
exclude
group:
'com.yilan.sdk'
,
module:
'ks'
...
...
app/src/main/java/com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
View file @
11b52bac
...
...
@@ -13,10 +13,10 @@ import com.bumptech.glide.Glide
import
com.kwad.sdk.api.*
import
com.kwad.sdk.api.KsNativeAd.VideoPlayListener
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.R
import
com.mints.goldspace.manager.KsManager
import
com.mints.goldspace.utils.LogUtil
import
java.util.*
import
com.mints.goldspace.R
/**
* 快手预加载信息流
...
...
@@ -32,8 +32,6 @@ object KsPreLoadExpressManager {
}
fun
loadKsFrameLayout
(
parent
:
ViewGroup
)
{
parent
.
removeAllViews
()
try
{
var
ksNativeAd
:
KsNativeAd
?
val
scene
=
KsScene
...
...
@@ -98,6 +96,7 @@ object KsPreLoadExpressManager {
}
override
fun
onVideoPlayError
(
what
:
Int
,
extra
:
Int
)
{
LogUtil
.
d
(
"KsPreLoadExpressManager"
,
"id=${what} extra=${extra}"
)
}
})
...
...
app/src/main/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
View file @
11b52bac
...
...
@@ -106,10 +106,9 @@ class KsVideoAdManager private constructor() :
}
})
videoAdStatusListener
?.
adSuccess
()
// PlayConfig默认竖屏播放,传null
//
mRewardVideoAd!!.showRewardVideoAd(activity, null)
mRewardVideoAd
!!
.
showRewardVideoAd
(
activity
,
null
)
}
}
...
...
app/src/main/java/com/mints/goldspace/ad/video/ShVideoAdManager.kt
View file @
11b52bac
...
...
@@ -98,7 +98,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
}
override
fun
onAdFailed
(
adError
:
ADError
)
{
LogUtil
.
d
(
TAG
,
"onAdFailed"
)
LogUtil
.
d
(
TAG
,
"onAdFailed"
+
adError
.
description
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_ONE
,
(
adError
.
code
).
toString
(),
adError
.
description
)
...
...
app/src/main/java/com/mints/goldspace/common/Constant.kt
View file @
11b52bac
...
...
@@ -139,6 +139,7 @@ object Constant {
const
val
CARRIER_FULLVEDIO_COMMON
=
"FULLVEDIO_COMMON"
//全屏视频-通用
const
val
CARRIER_EXPRESS_COMMON
=
"EXPRESS_COMMON"
//信息流-通用
const
val
CARRIER_EXPRESS_DIALOG
=
"EXPRESS_DIALOG"
//信息流-弹窗
const
val
CARRIER_MC_FIRSTDOWNLOAD
=
"MC_FIRSTDOWNLOAD"
// 牧场人生下载奖励
const
val
CARRIER_FIRSTDOWNLOADS
=
"FIRSTDOWNLOADS"
// 其他下载奖励
...
...
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
View file @
11b52bac
...
...
@@ -3,6 +3,7 @@ package com.mints.goldspace.manager
import
android.app.Application
import
com.kwad.sdk.api.KsAdSDK
import
com.kwad.sdk.api.SdkConfig
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.R
/**
...
...
@@ -27,7 +28,7 @@ object KsManager {
.
appId
(
KS_APP_ID
)
// 测试aapId,请联系快⼿平台申请正式AppId,必填
.
appName
(
application
.
getString
(
R
.
string
.
app_name
))
// 测试appName,请填写您应⽤的名称,⾮必填
.
showNotification
(
true
)
// 是否展示下载通知栏
.
debug
(
false
)
// 是否开启sdk 调试⽇志 可选
.
debug
(
BuildConfig
.
DEBUG
)
// 是否开启sdk 调试⽇志 可选
.
build
())
}
...
...
app/src/main/java/com/mints/goldspace/mvp/presenters/CsjFullVedioAdPresenter.kt
deleted
100644 → 0
View file @
46d9c269
package
com.mints.goldspace.mvp.presenters
import
android.app.Activity
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.mvp.model.BaseResponse
import
com.mints.goldspace.mvp.views.VideoAdManagerView
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
class
CsjFullVedioAdPresenter
:
BasePresenter
<
VideoAdManagerView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
loanApplication
=
activity
.
application
as
MintsApplication
loanService
=
loanApplication
.
loanService
subscription
=
loanService
.
reportAddCoinMsg
(
vo
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
loanApplication
.
defaultSubscribeScheduler
())
.
subscribe
(
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{}
})
}
fun
dispose
()
{
loanService
=
null
loanApplication
=
null
if
(
subscription
!=
null
&&
!
subscription
.
isUnsubscribed
())
{
subscription
.
unsubscribe
()
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/mvp/presenters/MhVedioAdPresenter.kt
deleted
100644 → 0
View file @
46d9c269
package
com.mints.goldspace.mvp.presenters
import
android.app.Activity
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.mvp.model.BaseResponse
import
com.mints.goldspace.mvp.views.VideoAdManagerView
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
class
MhVideoAdPresenter
:
BasePresenter
<
VideoAdManagerView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
loanApplication
=
activity
.
application
as
MintsApplication
loanService
=
loanApplication
.
loanService
subscription
=
loanService
.
reportAddCoinMsg
(
vo
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
loanApplication
.
defaultSubscribeScheduler
())
.
subscribe
(
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{}
})
}
fun
dispose
()
{
loanService
=
null
loanApplication
=
null
if
(
subscription
!=
null
&&
!
subscription
.
isUnsubscribed
())
{
subscription
.
unsubscribe
()
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ui/activitys/AwardActivity.kt
View file @
11b52bac
...
...
@@ -173,7 +173,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant
.
CARRIER_HOMEVEDIO_CHALLENGE
,
Constant
.
CARRIER_MINIVEDIO_CHALLENGE
,
Constant
.
CARRIER_GAME_ONLINE
,
Constant
.
CARRIER_EATMEAL
,
Constant
.
CARRIER_RUISHINEWS_CHALLANGE
,
Constant
.
CARRIER_ZHANGYUE_CHALLENGE
,
Constant
.
CARRIER_XMLY_CHALLENGE
,
Constant
.
CARRIER_SHARE_NEWS
->
{
Constant
.
CARRIER_XMLY_CHALLENGE
,
Constant
.
CARRIER_SHARE_NEWS
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
...
...
app/src/main/java/com/mints/goldspace/ui/adapter/MainMyAdapter.kt
View file @
11b52bac
...
...
@@ -55,6 +55,9 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
// 喜马拉雅
const
val
TO_XMLY
=
"TO_XMLY"
// 下载牧场人生
const
val
TO_FIRSTDOWNLOAD
=
"TO_FIRSTDOWNLOAD"
// 其他下载应用
const
val
TO_DOWNLOADS
=
"TO_DOWNLOADS"
}
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
View file @
11b52bac
...
...
@@ -790,6 +790,33 @@ class MyFragment : BaseFragment(),
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
taskBean
.
otherConfig
.
key
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
onDestroyBroadcastReceiver
()
}
}
}
}
MainMyAdapter
.
TO_FIRSTDOWNLOAD
->
{
if
(
taskBean
.
otherConfig
!=
null
)
{
when
(
taskBean
.
otherConfig
.
status
)
{
0
->
{
// 牧场人生包名
pkgMCRSCarrier
=
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
pkgMCRSKey
=
""
pkgMCRSName
=
taskBean
.
otherConfig
.
pkg
// 下载牧场人生
DownloadApkManager
.
downloadApk
(
requireActivity
(),
taskBean
.
otherConfig
.
downloadUrl
,
pkgMCRSName
)
// 开启广播监听安装事件
registerBroad
()
}
1
->
{
// 牧场人生APP,直接弹奖励框
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
otherConfig
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
onDestroyBroadcastReceiver
()
}
}
...
...
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