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
37863e7a
Commit
37863e7a
authored
Nov 05, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.3.7版本提交,升级最新的广告sdk,删除猎豹游戏,中文在线
parent
33ca2cd5
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
100 additions
and
776 deletions
+100
-776
build.gradle
GoodMoney/app/build.gradle
+53
-52
open_ad_sdk_4.0.1.9.aar
GoodMoney/app/libs/open_ad_sdk_4.0.1.9.aar
+0
-0
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+1
-2
ReadToutiaoAD.java
.../main/java/com/mints/goodmoney/manager/ReadToutiaoAD.java
+0
-309
ReadYlhAd.java
.../src/main/java/com/mints/goodmoney/manager/ReadYlhAd.java
+0
-133
ReaderManager.kt
...rc/main/java/com/mints/goodmoney/manager/ReaderManager.kt
+0
-104
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+0
-2
WrapperActivity.kt
.../java/com/mints/goodmoney/ui/activitys/WrapperActivity.kt
+0
-7
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+0
-1
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+2
-20
ReaderFragment.kt
...in/java/com/mints/goodmoney/ui/fragment/ReaderFragment.kt
+0
-93
shape_btn_bg_blue.xml
GoodMoney/app/src/main/res/drawable/shape_btn_bg_blue.xml
+0
-9
build.gradle
GoodMoney/build.gradle
+42
-42
gradle.properties
GoodMoney/gradle.properties
+2
-2
No files found.
GoodMoney/app/build.gradle
View file @
37863e7a
...
@@ -2,9 +2,9 @@ apply plugin: 'com.android.application'
...
@@ -2,9 +2,9 @@ apply plugin: 'com.android.application'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'dagger.hilt.android.plugin'
//
apply plugin: 'dagger.hilt.android.plugin'
apply
plugin:
'androidx.navigation.safeargs.kotlin'
//
apply plugin: 'androidx.navigation.safeargs.kotlin'
apply
plugin:
'android-aspectjx'
//
apply plugin: 'android-aspectjx'
android
{
android
{
compileSdkVersion
rootProject
.
ext
.
androidCompileSdkVersion
compileSdkVersion
rootProject
.
ext
.
androidCompileSdkVersion
...
@@ -68,9 +68,9 @@ android {
...
@@ -68,9 +68,9 @@ android {
arg
(
"AROUTER_MODULE_NAME"
,
project
.
getName
())
arg
(
"AROUTER_MODULE_NAME"
,
project
.
getName
())
}
}
}
}
aspectjx
{
//
aspectjx {
exclude
'versions.9'
//
exclude 'versions.9'
}
//
}
buildFeatures
{
buildFeatures
{
dataBinding
true
dataBinding
true
...
@@ -283,50 +283,50 @@ dependencies {
...
@@ -283,50 +283,50 @@ dependencies {
// 激励视频RTA
// 激励视频RTA
implementation
(
name:
'taskwake1.0'
,
ext:
'aar'
)
implementation
(
name:
'taskwake1.0'
,
ext:
'aar'
)
// 听读
// 听读
implementation
files
(
'libs/Reader17kSDK-release1.1.3.aar'
)
//
implementation files('libs/Reader17kSDK-release1.1.3.aar')
implementation
files
(
'libs/readerlib-release1.1.aar'
)
//
implementation files('libs/readerlib-release1.1.aar')
implementation
files
(
'libs/filter-lib-release1.1.aar'
)
//
implementation files('libs/filter-lib-release1.1.aar')
compileOnly
"com.squareup.inject:assisted-inject-annotations-dagger2:$rootProject.assistedInjectVersion"
//
compileOnly "com.squareup.inject:assisted-inject-annotations-dagger2:$rootProject.assistedInjectVersion"
kapt
"androidx.room:room-compiler:$rootProject.roomVersion"
//
kapt "androidx.room:room-compiler:$rootProject.roomVersion"
kapt
"com.google.dagger:hilt-android-compiler:$rootProject.hiltVersion"
//
kapt "com.google.dagger:hilt-android-compiler:$rootProject.hiltVersion"
kapt
"androidx.hilt:hilt-compiler:$rootProject.hiltViewModelVersion"
//
kapt "androidx.hilt:hilt-compiler:$rootProject.hiltViewModelVersion"
kapt
"com.squareup.inject:assisted-inject-processor-dagger2:$rootProject.assistedInjectVersion"
//
kapt "com.squareup.inject:assisted-inject-processor-dagger2:$rootProject.assistedInjectVersion"
implementation
"androidx.core:core-ktx:$rootProject.ktxVersion"
//
implementation "androidx.core:core-ktx:$rootProject.ktxVersion"
implementation
"androidx.fragment:fragment-ktx:$rootProject.fragmentVersion"
//
implementation "androidx.fragment:fragment-ktx:$rootProject.fragmentVersion"
implementation
"androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
//
implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
implementation
"androidx.lifecycle:lifecycle-livedata-ktx:$rootProject.lifecycleVersion"
//
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$rootProject.lifecycleVersion"
implementation
"androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycleVersion"
//
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycleVersion"
implementation
"androidx.navigation:navigation-fragment-ktx:$rootProject.navigationVersion"
//
implementation "androidx.navigation:navigation-fragment-ktx:$rootProject.navigationVersion"
implementation
"androidx.navigation:navigation-ui-ktx:$rootProject.navigationVersion"
//
implementation "androidx.navigation:navigation-ui-ktx:$rootProject.navigationVersion"
implementation
"androidx.paging:paging-runtime:$rootProject.pagingVersion"
//
implementation "androidx.paging:paging-runtime:$rootProject.pagingVersion"
implementation
"androidx.room:room-runtime:$rootProject.roomVersion"
//
implementation "androidx.room:room-runtime:$rootProject.roomVersion"
implementation
"androidx.room:room-ktx:$rootProject.roomVersion"
//
implementation "androidx.room:room-ktx:$rootProject.roomVersion"
implementation
"androidx.viewpager2:viewpager2:$rootProject.viewPagerVersion"
//
implementation "androidx.viewpager2:viewpager2:$rootProject.viewPagerVersion"
implementation
"androidx.work:work-runtime-ktx:$rootProject.workVersion"
//
implementation "androidx.work:work-runtime-ktx:$rootProject.workVersion"
implementation
"com.google.code.gson:gson:$rootProject.gsonVersion"
//
implementation "com.google.code.gson:gson:$rootProject.gsonVersion"
implementation
"org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutinesVersion"
//
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutinesVersion"
implementation
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutinesVersion"
//
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutinesVersion"
implementation
"com.google.dagger:hilt-android:$rootProject.hiltVersion"
//
implementation "com.google.dagger:hilt-android:$rootProject.hiltVersion"
implementation
"androidx.hilt:hilt-lifecycle-viewmodel:$rootProject.hiltViewModelVersion"
//
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$rootProject.hiltViewModelVersion"
implementation
"com.scwang.smart:refresh-header-material:$rootProject.refresh_version"
//
implementation "com.scwang.smart:refresh-header-material:$rootProject.refresh_version"
implementation
'com.github.pdog18:dimension-extensions:1.0'
//
implementation 'com.github.pdog18:dimension-extensions:1.0'
implementation
'com.github.zhpanvip:BannerViewPager:3.2.0'
//
implementation 'com.github.zhpanvip:BannerViewPager:3.2.0'
api
"androidx.navigation:navigation-fragment-ktx:$navigationVersion"
//
api "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
api
"androidx.navigation:navigation-ui-ktx:$navigationVersion"
//
api "androidx.navigation:navigation-ui-ktx:$navigationVersion"
api
"androidx.navigation:navigation-dynamic-features-fragment:$navigationVersion"
//
api "androidx.navigation:navigation-dynamic-features-fragment:$navigationVersion"
implementation
'com.github.warkiz.widget:indicatorseekbar:1.2.9'
//
implementation 'com.github.warkiz.widget:indicatorseekbar:1.2.9'
implementation
'org.greenrobot:eventbus:3.2.0'
//
implementation 'org.greenrobot:eventbus:3.2.0'
implementation
'skin.support:skin-support:4.0.5'
//
implementation 'skin.support:skin-support:4.0.5'
implementation
'skin.support:skin-support-appcompat:4.0.5'
//
implementation 'skin.support:skin-support-appcompat:4.0.5'
implementation
'skin.support:skin-support-design:4.0.5'
//
implementation 'skin.support:skin-support-design:4.0.5'
implementation
'skin.support:skin-support-cardview:4.0.5'
//
implementation 'skin.support:skin-support-cardview:4.0.5'
implementation
'skin.support:skin-support-constraint-layout:4.0.5'
//
implementation 'skin.support:skin-support-constraint-layout:4.0.5'
implementation
"androidx.datastore:datastore-preferences:1.0.0-alpha02"
//
implementation "androidx.datastore:datastore-preferences:1.0.0-alpha02"
implementation
'com.github.F1ReKing:StatusLayout:1.2.1'
//
implementation 'com.github.F1ReKing:StatusLayout:1.2.1'
kapt
"com.alibaba:arouter-compiler:$arouter_compiler_version"
//
kapt "com.alibaba:arouter-compiler:$arouter_compiler_version"
implementation
"com.alibaba:arouter-api:$arouter_api_version"
//
implementation "com.alibaba:arouter-api:$arouter_api_version"
implementation
'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
//
implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
api
'org.aspectj:aspectjrt:1.9.5'
//
api 'org.aspectj:aspectjrt:1.9.5'
//小满
//小满
implementation
(
name:
'adsdk-1.4.3'
,
ext:
'aar'
)
{
implementation
(
name:
'adsdk-1.4.3'
,
ext:
'aar'
)
{
exclude
group:
"com.miit.sdk"
exclude
group:
"com.miit.sdk"
...
@@ -347,8 +347,9 @@ dependencies {
...
@@ -347,8 +347,9 @@ dependencies {
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// 穿山甲广告 4.0.11
// 穿山甲广告 4.0.11
// implementation(name: 'open_ad_sdk_4.0.1.9', ext: 'aar')
// implementation 'com.pangle.cn:ads-sdk-pro:4.0.1.9'
implementation
'com.pangle.cn:ads-sdk-pro:4.0.1.9'
// implementation 'com.pangle.cn:ads-sdk-pro:3.9.0.5'
implementation
'com.pangle.cn:ads-sdk-pro:4.0.0.6'
implementation
(
name:
'tools_release'
,
ext:
'aar'
)
implementation
(
name:
'tools_release'
,
ext:
'aar'
)
// 广点通广告 腾讯
// 广点通广告 腾讯
implementation
(
name:
'GDTSDK.unionNormal.4.420.1290'
,
ext:
'aar'
)
implementation
(
name:
'GDTSDK.unionNormal.4.420.1290'
,
ext:
'aar'
)
...
...
GoodMoney/app/libs/open_ad_sdk_4.0.1.9.aar
deleted
100644 → 0
View file @
33ca2cd5
File deleted
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
37863e7a
...
@@ -42,7 +42,6 @@ import com.ximalaya.ting.android.opensdk.util.BaseUtil;
...
@@ -42,7 +42,6 @@ import com.ximalaya.ting.android.opensdk.util.BaseUtil;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
dagger.hilt.android.HiltAndroidApp
;
import
rx.Scheduler
;
import
rx.Scheduler
;
import
rx.schedulers.Schedulers
;
import
rx.schedulers.Schedulers
;
...
@@ -51,7 +50,7 @@ import rx.schedulers.Schedulers;
...
@@ -51,7 +50,7 @@ import rx.schedulers.Schedulers;
* 作者:孟崔广
* 作者:孟崔广
* 时间:2020/10/09 11:40
* 时间:2020/10/09 11:40
*/
*/
@HiltAndroidApp
//
@HiltAndroidApp
public
class
MintsApplication
extends
MultiDexApplication
{
public
class
MintsApplication
extends
MultiDexApplication
{
private
static
MintsApplication
mContext
;
private
static
MintsApplication
mContext
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ReadToutiaoAD.java
deleted
100755 → 0
View file @
33ca2cd5
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ReadYlhAd.java
deleted
100644 → 0
View file @
33ca2cd5
package
com
.
mints
.
goodmoney
.
manager
;
import
android.content.Context
;
import
android.os.SystemClock
;
import
android.widget.Toast
;
import
com.chineseall.reader.lib.reader.callbacks.OnAdViewReceiver
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.comm.util.AdError
;
import
java.util.Map
;
/**
* 中文在线 听读 优量汇广告
*/
public
class
ReadYlhAd
{
private
Context
context
;
private
RewardVideoAD
rewardVideoAD
;
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
private
OnVideoCloseCallBack
callBack
;
public
void
loadVideoAd
(
Context
context
,
OnAdViewReceiver
receiver
)
{
this
.
context
=
context
;
initVedioAD
(
context
,
receiver
);
}
private
void
initVedioAD
(
final
Context
context
,
OnAdViewReceiver
receiver
)
{
rewardVideoAD
=
new
RewardVideoAD
(
context
,
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_READER_POSTID
(),
new
RewardVideoADListener
()
{
@Override
public
void
onADLoad
()
{
//广告加载成功,可在此回调后进行广告展示,此时广告过期时间确定,可通过RewardVideoAD.getExpireTimestamp()获取
receiver
.
onReceive
(
true
,
null
);
}
@Override
public
void
onVideoCached
()
{
//视频素材缓存成功,可在此回调后进行广告展示
}
@Override
public
void
onADShow
()
{
//激励视频广告页面展示,此后RewardVideoAD.hasShown()返回true
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
);
}
@Override
public
void
onADExpose
()
{
//激励视频广告曝光
}
@Override
public
void
onReward
(
Map
<
String
,
Object
>
map
)
{
}
@Override
public
void
onADClick
()
{
//激励视频广告被点击
if
(
AppConfig
.
needReportClickAdEvent
)
{
TrackManager
.
getInstance
().
reportClickAdEvent
();
}
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
);
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
);
isClickScreen
=
false
;
}
}
@Override
public
void
onVideoComplete
()
{
//广告视频素材播放完毕
}
@Override
public
void
onADClose
()
{
//激励视频广告被关闭
if
(
callBack
!=
null
)
{
callBack
.
onClose
();
}
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
}
@Override
public
void
onError
(
AdError
adError
)
{
//广告流程出错,AdError中包含错误码和错误描述
receiver
.
onReceive
(
false
,
null
);
ToastUtil
.
show
(
context
,
"视频加载失败,请退出重试"
);
// Toast.makeText(context, "视频播放错误", Toast.LENGTH_SHORT).show();
if
(
adError
!=
null
)
{
LogUtil
.
d
(
"YlhVideoAdManager"
,
"onError "
+
adError
.
getErrorCode
()
+
adError
.
getErrorMsg
());
// 0 成功 1失败 2点击 3-有效展示
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
adError
.
getErrorCode
()),
adError
.
getErrorMsg
());
}
}
});
rewardVideoAD
.
loadAD
();
}
public
void
showVideo
(
Context
context
,
OnVideoCloseCallBack
callBack
)
{
this
.
callBack
=
callBack
;
try
{
if
(!
rewardVideoAD
.
hasShown
())
{
//广告展示检查2:当前广告数据还没有展示过
long
delta
=
1000
;
//建议给广告过期时间加个buffer,单位ms,这里demo采用1000ms的buffer
//广告展示检查3:展示广告前判断广告数据未过期
if
(
SystemClock
.
elapsedRealtime
()
<
(
rewardVideoAD
.
getExpireTimestamp
()
-
delta
))
{
rewardVideoAD
.
showAD
();
}
else
{
// showToast("广告已过期,请再次请求广告后进行广告展示!");
ToastUtil
.
show
(
context
,
"视频加载失败,请退出重试"
);
}
}
else
{
// showToast("此条广告已经展示过,请再次请求广告后进行广告展示!");
ToastUtil
.
show
(
context
,
"视频加载失败,请退出重试"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Load Fail"
);
}
}
public
interface
OnVideoCloseCallBack
{
void
onClose
();
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ReaderManager.kt
deleted
100644 → 0
View file @
33ca2cd5
package
com.mints.goodmoney.manager
import
android.app.Application
import
android.app.Dialog
import
android.view.View
import
androidx.appcompat.app.AlertDialog
import
com.chineseall.reader.lib.reader.callbacks.OnAdViewReceiver
import
com.chineseall.reader17ksdk.ChineseAllReaderApplication.Companion.install
import
com.chineseall.reader17ksdk.callbacks.AdProvider
import
com.chineseall.reader17ksdk.utils.ActivityStackManager
import
com.chineseall.reader17ksdk.utils.DensityUtil.dip2px
import
com.chineseall.reader17ksdk.utils.DensityUtil.px2dip
import
com.chineseall.reader17ksdk.utils.NetworkUtil.isNetworkAvailable
import
com.chineseall.reader17ksdk.utils.NetworkUtil.isWifiConnected
import
com.chineseall.reader17ksdk.utils.book.ScreenUtils
import
com.mints.goodmoney.MintsApplication
/**
* 中文在线 听读
* 作者:孟崔广
* 时间:2021/04/08 14:44
* 邮箱:mengcga@163.com
*/
object
ReaderManager
{
private
const
val
APP_ID
=
"1242"
private
const
val
SECRET
=
"hzq@1242"
private
const
val
APP
=
"32"
private
const
val
SUBAPP
=
"0"
private
val
csjAd
by
lazy
{
ReadToutiaoAD
()
}
private
val
ylhAd
by
lazy
{
ReadYlhAd
()
}
private
const
val
csjVedioAD
:
String
=
"CSJ"
private
const
val
ylhVedioAD
:
String
=
"Ylh"
private
var
curVedioAd
:
String
=
""
private
var
isCsjAd
:
Boolean
=
true
fun
init
()
{
val
applicationContext
=
MintsApplication
.
getContext
()
install
(
applicationContext
,
APP_ID
,
SECRET
,
APP
,
SUBAPP
,
object
:
AdProvider
{
/**
* 阅读⻚弹窗广告确认按钮的点击回调-激励视频
* @param dialog
* @param block 对话框关闭回调,必须调用,否则计时每次切换章节都会出现弹窗
*/
override
fun
onAdDialogPositiveClick
(
dialog
:
Dialog
?,
function0
:
Function0
<
Unit
>)
{
if
(
isNetworkAvailable
(
applicationContext
)
&&
!
isWifiConnected
(
applicationContext
))
{
AlertDialog
.
Builder
(
ActivityStackManager
.
getInstance
().
topActivity
)
.
setTitle
(
"温馨提示"
)
.
setMessage
(
"当前处于移动网络,播放视频会消耗流量,确定播放?"
)
.
setPositiveButton
(
"观看视频"
)
{
dialog
,
which
->
onAdDialogInvoke
(
function0
)
}.
setNegativeButton
(
"取消"
)
{
dialog
,
which
->
dialog
.
dismiss
()
}
.
create
().
show
()
return
}
else
{
onAdDialogInvoke
(
function0
)
}
}
/**
* 阅读⻚首次打开 弹框广告(信息流) 广告宽度 320 高度 260 * @param adViewContainer 广告view的容器
*/
override
fun
getReaderScreenAd
(
view
:
View
,
receiver
:
OnAdViewReceiver
,
dialog
:
Dialog
?)
{
csjAd
.
loadAD
(
applicationContext
,
receiver
,
320
,
260
,
ReadToutiaoAD
.
OnClickListener
{
dialog
!!
.
dismiss
()
})
}
/**
* 阅读⻚翻⻚广告(信息流) 广告宽度 320 高度 260
*/
override
fun
getReaderPageAd
(
receiver
:
OnAdViewReceiver
)
{
csjAd
.
loadAD
(
applicationContext
,
receiver
,
px2dip
(
applicationContext
,
ScreenUtils
.
getScreenWidth
(
applicationContext
)
-
dip2px
(
applicationContext
,
30f
).
toFloat
()),
px2dip
(
applicationContext
,
854f
),
null
)
}
/**
* 阅读⻚定时弹窗广告 (激励视频)
*/
override
fun
getReaderDialogAd
(
view
:
View
,
receiver
:
OnAdViewReceiver
,
dialog
:
Dialog
?)
{
if
(
isCsjAd
)
{
curVedioAd
=
csjVedioAD
csjAd
.
loadVideoAd
(
ActivityStackManager
.
getInstance
().
topActivity
,
receiver
)
}
else
{
curVedioAd
=
ylhVedioAD
ylhAd
.
loadVideoAd
(
ActivityStackManager
.
getInstance
().
topActivity
,
receiver
)
}
isCsjAd
=
!
isCsjAd
}
})
}
private
fun
onAdDialogInvoke
(
function0
:
()
->
Unit
)
{
when
(
curVedioAd
)
{
csjVedioAD
->
{
csjAd
.
showVideo
(
ActivityStackManager
.
getInstance
().
topActivity
)
{
function0
.
invoke
()
}
}
ylhVedioAD
->
{
ylhAd
.
showVideo
(
ActivityStackManager
.
getInstance
().
topActivity
)
{
function0
.
invoke
()
}
}
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
37863e7a
...
@@ -21,7 +21,6 @@ import com.mints.goodmoney.mvp.views.MainView
...
@@ -21,7 +21,6 @@ import com.mints.goodmoney.mvp.views.MainView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.fragment.*
import
com.mints.goodmoney.ui.fragment.*
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
dagger.hilt.android.AndroidEntryPoint
import
kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.activity_main.*
/**
/**
...
@@ -30,7 +29,6 @@ import kotlinx.android.synthetic.main.activity_main.*
...
@@ -30,7 +29,6 @@ import kotlinx.android.synthetic.main.activity_main.*
* 时间:2020/10/9 10:39
* 时间:2020/10/9 10:39
* 邮箱:mengcga@163.com
* 邮箱:mengcga@163.com
*/
*/
@AndroidEntryPoint
class
MainActivity
:
BaseActivity
(),
MainView
,
View
.
OnClickListener
{
class
MainActivity
:
BaseActivity
(),
MainView
,
View
.
OnClickListener
{
private
val
audioManager
by
lazy
{
getSystemService
(
Context
.
AUDIO_SERVICE
)
as
AudioManager
}
private
val
audioManager
by
lazy
{
getSystemService
(
Context
.
AUDIO_SERVICE
)
as
AudioManager
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WrapperActivity.kt
View file @
37863e7a
...
@@ -4,13 +4,11 @@ import android.os.Bundle
...
@@ -4,13 +4,11 @@ import android.os.Bundle
import
android.view.View
import
android.view.View
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentTransaction
import
androidx.fragment.app.FragmentTransaction
import
com.chineseall.reader17ksdk.feature.main.bookshop.wellchosen.WellChosenFragment
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.fragment.*
import
com.mints.goodmoney.ui.fragment.*
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
dagger.hilt.android.AndroidEntryPoint
import
kotlinx.android.synthetic.main.activity_wrapper.*
import
kotlinx.android.synthetic.main.activity_wrapper.*
import
kotlinx.android.synthetic.main.header_layout.*
import
kotlinx.android.synthetic.main.header_layout.*
...
@@ -19,7 +17,6 @@ import kotlinx.android.synthetic.main.header_layout.*
...
@@ -19,7 +17,6 @@ import kotlinx.android.synthetic.main.header_layout.*
* 作者:孟崔广
* 作者:孟崔广
* 时间:2020/12/10 12:39
* 时间:2020/12/10 12:39
*/
*/
@AndroidEntryPoint
class
WrapperActivity
:
BaseActivity
(),
View
.
OnClickListener
{
class
WrapperActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
wrapperType
=
Constant
.
WRAPPER_TYPE_NEWS
private
var
wrapperType
=
Constant
.
WRAPPER_TYPE_NEWS
...
@@ -64,10 +61,6 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
...
@@ -64,10 +61,6 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
// transaction.show(wellChosenFragment)
// transaction.show(wellChosenFragment)
// transaction.commitAllowingStateLoss()
// transaction.commitAllowingStateLoss()
}
}
Constant
.
WRAPPER_TYPE_BOOK
->
{
tv_title
.
text
=
"书城"
currentFragment
=
ReaderFragment
()
}
Constant
.
WRAPPER_TYPE_FRIENDS
->
{
Constant
.
WRAPPER_TYPE_FRIENDS
->
{
tv_title
.
text
=
"瓜分百万现金福利"
tv_title
.
text
=
"瓜分百万现金福利"
currentFragment
=
FriendsFragment
(
true
)
currentFragment
=
FriendsFragment
(
true
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
37863e7a
...
@@ -190,7 +190,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -190,7 +190,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
homePresenter
.
comSaveTerminalInfo
(
ps
)
homePresenter
.
comSaveTerminalInfo
(
ps
)
baseApplication
.
initUm
(
context
)
baseApplication
.
initUm
(
context
)
baseApplication
.
TalkingDataConfig
()
baseApplication
.
TalkingDataConfig
()
ReaderManager
.
init
()
// }
// }
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
37863e7a
...
@@ -18,16 +18,12 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -18,16 +18,12 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
companion
object
{
companion
object
{
const
val
FRAGMENT_TAG_VIDEO
=
"FRAGMENT_TAG_VIDEO"
const
val
FRAGMENT_TAG_VIDEO
=
"FRAGMENT_TAG_VIDEO"
const
val
FRAGMENT_TAG_BOOKSTORE
=
"FRAGMENT_TAG_BOOKSTORE"
const
val
FRAGMENT_TAG_NEWS
=
"FRAGMENT_TAG_NEWS"
const
val
FRAGMENT_TAG_GAME
=
"FRAGMENT_TAG_GAME"
const
val
FRAGMENT_TAG_KYL
=
"FRAGMENT_TAG_KYL"
const
val
FRAGMENT_TAG_KYL
=
"FRAGMENT_TAG_KYL"
const
val
FRAGMENT_TAG_XMLY
=
"FRAGMENT_TAG_XMLY"
const
val
FRAGMENT_TAG_XMLY
=
"FRAGMENT_TAG_XMLY"
}
}
private
var
currentFragment
:
Fragment
?
=
null
private
var
currentFragment
:
Fragment
?
=
null
private
var
mainFragment
:
Fragment
?
=
null
private
var
mainFragment
:
Fragment
?
=
null
private
var
bookStoreFragment
:
Fragment
?
=
null
// private var newsFragment: Fragment? = null
// private var newsFragment: Fragment? = null
private
var
xmlyGameFragment
:
Fragment
?
=
null
private
var
xmlyGameFragment
:
Fragment
?
=
null
...
@@ -70,17 +66,14 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -70,17 +66,14 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
currentFragment
=
mainFragment
currentFragment
=
mainFragment
}
}
xtFragmentMoney
.
setxTabDisplayNum
(
4
)
xtFragmentMoney
.
setxTabDisplayNum
(
3
)
val
newTab1
=
xtFragmentMoney
.
newTab
()
val
newTab1
=
xtFragmentMoney
.
newTab
()
newTab1
.
text
=
"视频"
newTab1
.
text
=
"视频"
val
newTab3
=
xtFragmentMoney
.
newTab
()
newTab3
.
text
=
"书城"
val
newTab4
=
xtFragmentMoney
.
newTab
()
val
newTab4
=
xtFragmentMoney
.
newTab
()
newTab4
.
text
=
"听书"
newTab4
.
text
=
"听书"
val
newTab6
=
xtFragmentMoney
.
newTab
()
val
newTab6
=
xtFragmentMoney
.
newTab
()
newTab6
.
text
=
"来电秀"
newTab6
.
text
=
"来电秀"
xtFragmentMoney
.
addTab
(
newTab1
)
xtFragmentMoney
.
addTab
(
newTab1
)
xtFragmentMoney
.
addTab
(
newTab3
)
xtFragmentMoney
.
addTab
(
newTab4
)
xtFragmentMoney
.
addTab
(
newTab4
)
xtFragmentMoney
.
addTab
(
newTab6
)
xtFragmentMoney
.
addTab
(
newTab6
)
xtFragmentMoney
.
addOnTabSelectedListener
(
this
)
xtFragmentMoney
.
addOnTabSelectedListener
(
this
)
...
@@ -135,11 +128,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -135,11 +128,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
}
fun
selectBook
()
{
fun
selectBook
()
{
xtFragmentMoney
.
getTabAt
(
1
)
?.
select
()
if
(
bookStoreFragment
==
null
)
{
bookStoreFragment
=
ReaderFragment
()
}
addOrShowFragment
(
childFragmentManager
,
bookStoreFragment
!!
,
FRAGMENT_TAG_BOOKSTORE
)
}
}
fun
selectXmly
()
{
fun
selectXmly
()
{
...
@@ -173,18 +161,12 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -173,18 +161,12 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
}
1
->
{
1
->
{
if
(
bookStoreFragment
==
null
)
{
bookStoreFragment
=
ReaderFragment
()
}
addOrShowFragment
(
childFragmentManager
,
bookStoreFragment
!!
,
FRAGMENT_TAG_BOOKSTORE
)
}
2
->
{
if
(
xmlyGameFragment
==
null
)
{
if
(
xmlyGameFragment
==
null
)
{
xmlyGameFragment
=
XmlyFragment
()
xmlyGameFragment
=
XmlyFragment
()
}
}
addOrShowFragment
(
childFragmentManager
,
xmlyGameFragment
!!
,
FRAGMENT_TAG_XMLY
)
addOrShowFragment
(
childFragmentManager
,
xmlyGameFragment
!!
,
FRAGMENT_TAG_XMLY
)
}
}
3
->
{
2
->
{
if
(
kuYinyueFragment
==
null
)
{
if
(
kuYinyueFragment
==
null
)
{
kuYinyueFragment
=
KuYinYueFragment
()
kuYinyueFragment
=
KuYinYueFragment
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/ReaderFragment.kt
deleted
100644 → 0
View file @
33ca2cd5
package
com.mints.goodmoney.ui.fragment
import
android.os.Bundle
import
android.view.View
import
androidx.fragment.app.FragmentTransaction
import
com.chineseall.reader17ksdk.ChineseAllReaderApplication
import
com.chineseall.reader17ksdk.callbacks.OnReadCallBack
import
com.chineseall.reader17ksdk.feature.main.bookshop.wellchosen.WellChosenFragment
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.presenters.BookPresenter
import
com.mints.goodmoney.mvp.views.BookView
import
com.mints.goodmoney.ui.activitys.AwardActivity
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.SpanUtils
import
kotlinx.android.synthetic.main.fragment_main_zy.*
/**
* 描述:听读
* 作者:孟崔广
* 时间:2021/04/08 10:55
*/
class
ReaderFragment
:
LazyLoadBaseFragment
(),
BookView
,
OnReadCallBack
{
private
val
wellChosenFragment
by
lazy
{
WellChosenFragment
(
"home"
)
}
private
val
bookPresenter
by
lazy
{
BookPresenter
()
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_zy
override
fun
initViewsAndEvents
()
{}
override
fun
onFragmentFirstVisible
()
{
bookPresenter
.
attachView
(
this
)
val
transaction
:
FragmentTransaction
=
supportFragmentManager
.
beginTransaction
()
transaction
.
add
(
R
.
id
.
fragment
,
wellChosenFragment
,
ReaderFragment
::
class
.
java
.
simpleName
)
transaction
.
show
(
wellChosenFragment
)
transaction
.
commitAllowingStateLoss
()
//间隔30秒 回调一次 间隔任意设置
ChineseAllReaderApplication
.
setOnReadCallBack
(
this
,
30
*
1000
)
}
override
fun
onFragmentResume
()
{
super
.
onFragmentResume
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
bookPresenter
.
getReadInfo
()
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
ChineseAllReaderApplication
.
destory
()
bookPresenter
.
detachView
()
}
override
fun
readSecondsSuc
(
coin
:
Int
)
{
if
(
coin
>
0
)
{
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_ZHANGYUE
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
coin
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
override
fun
readInfo
(
sumTime
:
Int
,
sumCoin
:
Int
,
readTime
:
Int
)
{
//阅读{10}分钟,奖励{xx}金币,已读{x}分钟
tvZhangContent
.
visibility
=
View
.
VISIBLE
if
(
readTime
>=
sumTime
)
{
tvZhangContent
.
text
=
"今日阅读任务已完成"
}
else
{
tvZhangContent
.
text
=
SpanUtils
()
.
append
(
"阅读"
).
append
(
"${sumTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FF9837
)).
append
(
"分钟, "
)
.
append
(
"奖励"
).
append
(
"$sumCoin"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_cb4a39
)).
append
(
"金币, "
)
.
append
(
"已读"
).
append
(
"${readTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FF9837
)).
append
(
"分钟"
)
.
create
()
}
}
override
fun
onReceive
(
map
:
Map
<
String
,
Any
>)
{
val
time
=
map
.
get
(
"time"
).
toString
().
toInt
()
val
seconds
=
(
time
/
1000
)
// 阅读5秒以上 保存时长
if
(
seconds
>
5
)
{
bookPresenter
.
addReadSeconds
(
seconds
)
}
LogUtil
.
d
(
"ReaderFragment"
,
"time:-->${time}"
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/res/drawable/shape_btn_bg_blue.xml
deleted
100644 → 0
View file @
33ca2cd5
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/blue"
/>
<corners
android:radius=
"5dip"
/>
</shape>
\ No newline at end of file
GoodMoney/build.gradle
View file @
37863e7a
buildscript
{
buildscript
{
ext
.
kotlin_version
=
'1.3.72'
ext
.
kotlin_version
=
'1.3.72'
ext
{
//
ext {
// 听读 App dependencies
//
// 听读 App dependencies
appCompatVersion
=
'1.1.0'
//
appCompatVersion = '1.1.0'
assistedInjectVersion
=
'0.5.2'
//
assistedInjectVersion = '0.5.2'
constraintLayoutVersion
=
'2.0.0-beta3'
//
constraintLayoutVersion = '2.0.0-beta3'
coreTestingVersion
=
'2.0.0'
//
coreTestingVersion = '2.0.0'
coroutinesVersion
=
"1.3.0-M2"
//
coroutinesVersion = "1.3.0-M2"
espressoVersion
=
'3.1.1'
//
espressoVersion = '3.1.1'
fragmentVersion
=
'1.1.0-alpha09'
//
fragmentVersion = '1.1.0-alpha09'
glideVersion
=
'4.10.0'
//
glideVersion = '4.10.0'
gradleVersion
=
'4.0.1'
//
gradleVersion = '4.0.1'
gsonVersion
=
'2.8.2'
//
gsonVersion = '2.8.2'
hiltVersion
=
'2.28.3-alpha'
//
hiltVersion = '2.28.3-alpha'
hiltViewModelVersion
=
'1.0.0-alpha02'
//
hiltViewModelVersion = '1.0.0-alpha02'
junitVersion
=
'4.12'
//
junitVersion = '4.12'
kotlinVersion
=
'1.4.10'
//
kotlinVersion = '1.4.10'
ktlintVersion
=
'0.38.1'
//
ktlintVersion = '0.38.1'
ktxVersion
=
'1.0.2'
//
ktxVersion = '1.0.2'
lifecycleVersion
=
'2.2.0'
//
lifecycleVersion = '2.2.0'
materialVersion
=
'1.2.0'
//
materialVersion = '1.2.0'
navigationVersion
=
'2.3.1'
//
navigationVersion = '2.3.1'
okhttpLoggingVersion
=
'4.7.2'
//
okhttpLoggingVersion = '4.7.2'
pagingVersion
=
'3.0.0-alpha09'
//
pagingVersion = '3.0.0-alpha09'
recyclerViewVersion
=
'1.2.0-alpha04'
//
recyclerViewVersion = '1.2.0-alpha04'
retrofitVersion
=
'2.9.0'
//
retrofitVersion = '2.9.0'
roomVersion
=
'2.3.0-alpha01'
//
roomVersion = '2.3.0-alpha01'
runnerVersion
=
'1.0.1'
//
runnerVersion = '1.0.1'
truthVersion
=
'0.42'
//
truthVersion = '0.42'
testExtJunit
=
'1.1.0'
//
testExtJunit = '1.1.0'
uiAutomatorVersion
=
'2.2.0'
//
uiAutomatorVersion = '2.2.0'
viewPagerVersion
=
'1.0.0'
//
viewPagerVersion = '1.0.0'
workVersion
=
'2.1.0'
//
workVersion = '2.1.0'
kotlin_version
=
'1.4.10'
//
kotlin_version = '1.4.10'
arouter_compiler_version
=
'1.5.1'
//
arouter_compiler_version = '1.5.1'
arouter_api_version
=
'1.5.1'
//
arouter_api_version = '1.5.1'
refresh_version
=
"2.0.1"
//
refresh_version = "2.0.1"
}
//
}
repositories
{
repositories
{
google
()
google
()
...
@@ -56,11 +56,11 @@ buildscript {
...
@@ -56,11 +56,11 @@ buildscript {
classpath
'com.android.tools.build:gradle:4.0.1'
classpath
'com.android.tools.build:gradle:4.0.1'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 听读
//
// 听读
classpath
"androidx.navigation:navigation-safe-args-gradle-plugin:2.3.1"
//
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.1"
classpath
"com.google.dagger:hilt-android-gradle-plugin:2.28.3-alpha"
//
classpath "com.google.dagger:hilt-android-gradle-plugin:2.28.3-alpha"
classpath
'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10'
//
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10'
classpath
'com.sensorsdata.analytics.android:android-gradle-plugin2:3.3.1'
//
classpath 'com.sensorsdata.analytics.android:android-gradle-plugin2:3.3.1'
// 穿山甲APPlog
// 穿山甲APPlog
classpath
'com.bytedance.applog:RangersAppLog-All-plugin:5.2.6'
classpath
'com.bytedance.applog:RangersAppLog-All-plugin:5.2.6'
...
...
GoodMoney/gradle.properties
View file @
37863e7a
...
@@ -16,9 +16,9 @@ android.injected.testOnly=false
...
@@ -16,9 +16,9 @@ android.injected.testOnly=false
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
#
DEBUG_URL="http://39.97.65.143:9082/api-gm/"
DEBUG_URL
=
"http://39.97.65.143:9082/api-gm/"
#DEBUG_URL="http://192.168.31.194:8101/"
#DEBUG_URL="http://192.168.31.194:8101/"
DEBUG_URL
=
"https://api.mints-id.com/api-gm/"
#
DEBUG_URL="https://api.mints-id.com/api-gm/"
RELEASE_URL
=
"https://api.mints-id.com/api-gm/"
RELEASE_URL
=
"https://api.mints-id.com/api-gm/"
RELEASE_KEY_PASSWORD
=
mints.goodmoney
RELEASE_KEY_PASSWORD
=
mints.goodmoney
...
...
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