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
8db6a1ac
Commit
8db6a1ac
authored
Nov 16, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新优量汇最新包, 优化好兔
parent
154bb8a9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
93 deletions
+81
-93
build.gradle
GoodMoney/app/build.gradle
+6
-3
GDTSDK.unionNoPlugin.4.294.1164.aar
GoodMoney/app/libs/GDTSDK.unionNoPlugin.4.294.1164.aar
+0
-0
GDTSDK.unionNormal.4.232.1102.aar
GoodMoney/app/libs/GDTSDK.unionNormal.4.232.1102.aar
+0
-0
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+17
-0
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+58
-90
No files found.
GoodMoney/app/build.gradle
View file @
8db6a1ac
...
...
@@ -193,7 +193,7 @@ dependencies {
// 穿山甲广告
implementation
(
name:
'open_ad_sdk'
,
ext:
'aar'
)
// 广点通广告 腾讯
implementation
(
name:
'GDTSDK.unionNo
rmal.4.232.1102
'
,
ext:
'aar'
)
implementation
(
name:
'GDTSDK.unionNo
Plugin.4.294.1164
'
,
ext:
'aar'
)
// shareSdk
implementation
project
(
':shareSdkLib'
)
// umeng
...
...
@@ -203,11 +203,14 @@ dependencies {
// TalkingDada
implementation
files
(
'libs/SaaS_AppAnalytics_Android_SDK_V4.0.36.jar'
)
// 一览视频
implementation
(
"com.yilan.sdk:ui:2.0.0.4"
)
{
implementation
(
"com.yilan.sdk:ui:2.8.0.10"
)
{
exclude
group:
'com.yilan.sdk'
,
module:
'toutiao'
exclude
group:
'com.yilan.sdk'
,
module:
'gdt'
}
implementation
(
"com.yilan.sdk:ad:2.8.0.10"
){
exclude
group:
'com.yilan.sdk'
,
module:
'toutiao'
exclude
group:
'com.yilan.sdk'
,
module:
'gdt'
}
implementation
"com.yilan.sdk:ad:2.0.0.4"
implementation
(
'com.aliyun.ams:alicloud-android-httpdns:1.2.3@aar'
)
{
transitive
true
}
...
...
GoodMoney/app/libs/GDTSDK.unionNoPlugin.4.294.1164.aar
0 → 100644
View file @
8db6a1ac
File added
GoodMoney/app/libs/GDTSDK.unionNormal.4.232.1102.aar
deleted
100644 → 0
View file @
154bb8a9
File deleted
GoodMoney/app/src/main/AndroidManifest.xml
View file @
8db6a1ac
...
...
@@ -234,6 +234,20 @@
</provider>
<!-- 优量汇广告 -->
<!-- <provider-->
<!-- android:name="com.qq.e.comm.GDTFileProvider"-->
<!-- android:authorities="${applicationId}.gdt.fileprovider"-->
<!-- android:exported="false"-->
<!-- android:grantUriPermissions="true"-->
<!-- >-->
<!-- <meta-data-->
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
<!-- android:resource="@xml/gdt_file_path"-->
<!-- />-->
<!-- </provider>-->
<!-- 鱼丸盒子广告 -->
<provider
android:name=
"com.component.dly.xzzq_ywsdk.YwFileProvider"
...
...
@@ -255,8 +269,10 @@
android:name=
"com.bytedance.sdk.openadsdk.TTFileProvider"
android:authorities=
"${applicationId}.TTFileProvider"
android:exported=
"false"
tools:replace=
"android:authorities"
android:grantUriPermissions=
"true"
>
<meta-data
tools:replace=
"android:resource"
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:resource=
"@xml/file_paths"
/>
</provider>
...
...
@@ -280,6 +296,7 @@
<activity
android:name=
"com.qq.e.ads.LandscapeADActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
tools:replace=
"android:screenOrientation"
android:screenOrientation=
"landscape"
/>
</application>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
8db6a1ac
...
...
@@ -22,7 +22,10 @@ import com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.PowerDialog
import
com.mints.goodmoney.utils.LogUtil
import
com.yilan.sdk.ui.littlevideo.LittleVideoFragment
import
com.yilan.sdk.common.ui.mvp.YLPresenter
import
com.yilan.sdk.player.ylplayer.YLPlayerConfig
import
com.yilan.sdk.player.ylplayer.callback.OnPlayerCallBack
import
com.yilan.sdk.ui.little.YLLittleVideoFragment
import
kotlinx.android.synthetic.main.fragment_main_first.*
import
net.grandcentrix.tray.AppPreferences
...
...
@@ -43,7 +46,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 视频相关
private
var
rewardDoubleCoin
=
0
// 大金币
private
var
rewardCoin
=
0
// 小金币
private
var
littleVideoFragment
:
LittleVideoFragment
?
=
null
private
var
littleVideoFragment
:
YL
LittleVideoFragment
?
=
null
private
val
VEDIO_MAX_COUNT
=
12
// 当前缓存视频id最大数
private
val
vedioIdList
by
lazy
{
ArrayList
<
String
>()
}
//记录播放的视频id
private
var
isFirstLoadVedio
=
true
// 首次加载视频初始化
...
...
@@ -130,8 +133,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
super
.
onDestroy
()
cdvvYilanTime
?.
setCountDownVedioListener
(
null
)
littleVideoFragment
?.
setUserCallBack
(
null
)
//
YLPlayerConfig.config().unRegisterPlayerCallback()
//
littleVideoFragment?.setUserCallBack(null)
YLPlayerConfig
.
config
().
unRegisterPlayerCallback
()
homePresenter
.
detachView
()
}
...
...
@@ -221,92 +224,57 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 一览视频初始化
*/
private
fun
showLittle
()
{
// val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
// if (littleVideoFragment == null) {
// littleVideoFragment = YLLittleVideoFragment.newInstance()
// transaction.add(R.id.yilan_fragment_frame_container, littleVideoFragment!!, YLLittleVideoFragment::class.java.simpleName)
// // 设置点击的item播放状态,callback返回true标识用户已经处理了event,返回false,标识使用播放器内部逻辑处理event。
//
// YLPlayerConfig.config().registerPlayerCallBack(object : OnPlayerCallBack {
//
// override fun onStart(p0: String?, videoid: String, p2: String?) {
// // 防止网络异常时, 第一次加载倒计时红包
// if (isFirstLoadVedio) {
// isFirstLoadVedio = false
// initTimeview()
// }
//
// vedioId = videoid
// }
//
// override fun onPause(p0: String?, p1: String?, p2: String?) {
// pauseDownloadTime()
// }
//
// override fun onResume(p0: String?, videoid: String, p2: String?) {
// resumeDownloadTime(videoid)
// }
//
// override fun onComplete(p0: String?, videoid: String, p2: String?) {
// addVedioIdList(videoid)
// pauseDownloadTime()
// }
//
// override fun onLoopComplete(p0: String?, p1: String, p2: String?, p3: Int) {
// }
//
// override fun onStuckStart(p0: String?, p1: String?, p2: String?) {
// }
//
// override fun onStuckEnd(p0: String?, p1: String?, p2: String?) {
// }
//
// override fun onError(p0: String?, p1: String?, p2: String?) {
// pauseDownloadTime()
// }
//
// override fun onStop(p0: String?, p1: String?, p2: String?) {
// }
// })
//
//// littleVideoFragment!!.setUserCallBack { type, data, _ -> //播放状态 type
//// //播放的数据,可能为null data
//// //哪个播放器ß playerHash
//// when (type) {
//// com.yilan.sdk.player.utils.Constant.STATE_PREPARED -> {
//// // 防止网络异常时, 第一次加载倒计时红包
//// if (isFirstLoadVedio) {
//// isFirstLoadVedio = false
//// initTimeview()
//// }
////
//// vedioId = data.videoId
//// }
//// com.yilan.sdk.player.utils.Constant.STATE_ERROR -> {
////
//// pauseDownloadTime()
//// }
//// com.yilan.sdk.player.utils.Constant.STATE_PLAYING -> {
////
//// resumeDownloadTime(data.videoId)
//// }
////
//// com.yilan.sdk.player.utils.Constant.STATE_COMPLETE -> {
////
//// addVedioIdList(data.videoId)
//// pauseDownloadTime()
//// }
//// com.yilan.sdk.player.utils.Constant.STATE_PAUSED -> {
////
//// pauseDownloadTime()
//// }
//// }
//// false
//// }
// } else {
// transaction.show(littleVideoFragment!!)
// }
// transaction.commitAllowingStateLoss()
val
transaction
:
FragmentTransaction
=
supportFragmentManager
.
beginTransaction
()
if
(
littleVideoFragment
==
null
)
{
littleVideoFragment
=
YLLittleVideoFragment
.
newInstance
()
transaction
.
add
(
R
.
id
.
yilan_fragment_frame_container
,
littleVideoFragment
!!
,
YLLittleVideoFragment
::
class
.
java
.
simpleName
)
// 设置点击的item播放状态,callback返回true标识用户已经处理了event,返回false,标识使用播放器内部逻辑处理event。
YLPlayerConfig
.
config
().
registerPlayerCallBack
(
object
:
OnPlayerCallBack
{
override
fun
onStart
(
p0
:
String
?,
videoid
:
String
,
p2
:
String
?)
{
// 防止网络异常时, 第一次加载倒计时红包
if
(
isFirstLoadVedio
)
{
isFirstLoadVedio
=
false
initTimeview
()
}
vedioId
=
videoid
}
override
fun
onPause
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
pauseDownloadTime
()
}
override
fun
onResume
(
p0
:
String
?,
videoid
:
String
,
p2
:
String
?)
{
resumeDownloadTime
(
videoid
)
}
override
fun
onComplete
(
p0
:
String
?,
videoid
:
String
,
p2
:
String
?)
{
addVedioIdList
(
videoid
)
pauseDownloadTime
()
}
override
fun
onLoopComplete
(
p0
:
String
?,
p1
:
String
,
p2
:
String
?,
p3
:
Int
)
{
}
override
fun
onStuckStart
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
}
override
fun
onStuckEnd
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
}
override
fun
onError
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
pauseDownloadTime
()
}
override
fun
onStop
(
p0
:
String
?,
p1
:
String
?,
p2
:
String
?)
{
}
})
}
else
{
transaction
.
show
(
littleVideoFragment
!!
)
}
transaction
.
commitAllowingStateLoss
()
}
...
...
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