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
4b851896
Commit
4b851896
authored
Dec 23, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
bd0b9144
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
419 additions
and
37 deletions
+419
-37
build.gradle
GoodMoney/app/build.gradle
+7
-17
gson-2.3.1.jar
GoodMoney/app/libs/gson-2.3.1.jar
+0
-0
proguard-rules.pro
GoodMoney/app/proguard-rules.pro
+18
-1
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+7
-4
TTPreLoadCarrierExpressManager.java
.../goodmoney/ad/express/TTPreLoadCarrierExpressManager.java
+2
-3
TTPreLoadExpressManager.java
...m/mints/goodmoney/ad/express/TTPreLoadExpressManager.java
+3
-1
TTPreLoadExpressXmlyManager.java
...nts/goodmoney/ad/express/TTPreLoadExpressXmlyManager.java
+87
-0
YlhPreLoadExpressManager.java
.../mints/goodmoney/ad/express/YlhPreLoadExpressManager.java
+127
-0
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+5
-0
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+1
-0
YlhAdManager.kt
...src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
+1
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-1
FoodSubsidyActivity.kt
...a/com/mints/goodmoney/ui/activitys/FoodSubsidyActivity.kt
+1
-1
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+1
-1
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+1
-1
WalkActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
+1
-1
WaterActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
+1
-1
XmlyActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/XmlyActivity.kt
+2
-2
XmlyAwardActivity.kt
...ava/com/mints/goodmoney/ui/activitys/XmlyAwardActivity.kt
+99
-0
LiebaoGameFragment.kt
...ava/com/mints/goodmoney/ui/fragment/LiebaoGameFragment.kt
+1
-1
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+5
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+7
-2
libxmediaplayer_x.so
...Money/app/src/main/jniLibs/arm64-v8a/libxmediaplayer_x.so
+0
-0
libxmediaplayer.so
...Money/app/src/main/jniLibs/armeabi-v7a/libxmediaplayer.so
+0
-0
libxmediaplayerv7.so
...ney/app/src/main/jniLibs/armeabi-v7a/libxmediaplayerv7.so
+0
-0
libxmediaplayer.so
GoodMoney/app/src/main/jniLibs/armeabi/libxmediaplayer.so
+0
-0
libxmediaplayer_x.so
GoodMoney/app/src/main/jniLibs/armeabi/libxmediaplayer_x.so
+0
-0
libxmediaplayerv7.so
GoodMoney/app/src/main/jniLibs/armeabi/libxmediaplayerv7.so
+0
-0
activity_award_xmly.xml
GoodMoney/app/src/main/res/layout/activity_award_xmly.xml
+41
-0
No files found.
GoodMoney/app/build.gradle
View file @
4b851896
...
...
@@ -94,12 +94,6 @@ android {
}
}
sourceSets
{
main
{
jniLibs
.
srcDirs
=
[
'libs'
]
}
}
lintOptions
{
//lint 遇到 error 时继续 构建
//abortOnError false
...
...
@@ -181,9 +175,11 @@ dependencies {
// 工具类
// gson
implementation
files
(
'libs/gson-2.3.1.jar'
)
// implementation files('libs/gson-2.3.1.jar')
implementation
'com.google.code.gson:gson:2.8.1'
// BASE64Decoder
implementation
files
(
'libs/sun.misc.BASE64Decoder.jar'
)
//
implementation files('libs/sun.misc.BASE64Decoder.jar')
// 三方接入
// leakcanary
...
...
@@ -206,7 +202,7 @@ dependencies {
implementation
'com.umeng.umsdk:asms:1.1.3'
// asms包依赖(必选)
implementation
'com.umeng.umsdk:crash:0.0.4'
// native crash包依赖(必选)
// TalkingDada
implementation
files
(
'libs/SaaS_AppAnalytics_Android_SDK_V4.0.36.jar'
)
//
implementation files('libs/SaaS_AppAnalytics_Android_SDK_V4.0.36.jar')
// 一览视频
implementation
(
"com.yilan.sdk:ui:3.1.0.4"
)
{
exclude
group:
'com.yilan.sdk'
,
module:
'toutiao'
...
...
@@ -228,7 +224,7 @@ dependencies {
implementation
(
name:
'cmgame-sdk-tt3251-2.0.7'
,
ext:
'aar'
)
implementation
(
name:
'x5fit-2.0.7'
,
ext:
'aar'
)
implementation
(
name:
'gdtfit-2.0.7'
,
ext:
'aar'
)
implementation
files
(
"libs/qq_x5.jar"
)
//
implementation files("libs/qq_x5.jar")
// 鱼丸盒子
implementation
(
name:
'xzzq_ywsdk_1.1.0'
,
ext:
'aar'
)
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
...
...
@@ -256,14 +252,8 @@ dependencies {
implementation
(
name:
'scenemodule-2.1'
,
ext:
'aar'
)
implementation
(
name:
'scenead-2.1'
,
ext:
'aar'
)
implementation
'com.just.agentweb:agentweb:4.1.2'
// implementation 'com.squareup.okio:okio:1.13.0'
// implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
// 喜马拉雅 已集成
// 喜马拉雅
implementation
'com.android.support:appcompat-v7:28.0.0'
implementation
'com.android.support:support-v4:28.0.0'
implementation
'com.squareup.okio:okio:1.15.0'
implementation
files
(
'libs/TingPhoneOpenSDK_7.4.1.jar'
)
// testImplementation 'junit:junit:4.13'
...
...
GoodMoney/app/libs/gson-2.3.1.jar
deleted
100755 → 0
View file @
bd0b9144
File deleted
GoodMoney/app/proguard-rules.pro
View file @
4b851896
...
...
@@ -544,4 +544,21 @@
-keep public class org.codehaus.* { *; }
-keep public class java.nio.* { *; }
# ======================= 聚乐云 END ================
\ No newline at end of file
# ======================= 聚乐云 END ================
# ===================== 喜马拉雅 START ================
-dontwarn com.google.gson.
*
*
-dontwarn android.support.
*
*
-keep class android.support.
*
* { *;}
-dontwarn com.ximalaya.ting.android.player.
*
*
-keep class com.ximalaya.ting.android.player.
*
* { *;}
-dontwarn com.ximalaya.ting.android.opensdk.
*
*
-keep interface com.ximalaya.ting.android.opensdk.
*
* {*;}
-keep class com.ximalaya.ting.android.opensdk.
*
* { *; }
# ======================= 喜马拉雅 END ================
\ No newline at end of file
GoodMoney/app/src/main/AndroidManifest.xml
View file @
4b851896
...
...
@@ -109,7 +109,11 @@
android:name=
".ui.activitys.SplashYlhActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".ui.activitys.MainActivity"
...
...
@@ -189,14 +193,13 @@
<activity
android:name=
".ui.activitys.DhGameActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.XmlyAwardActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.XmlyActivity"
android:screenOrientation=
"portrait"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<service
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/
manager
/TTPreLoadCarrierExpressManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/
ad/express
/TTPreLoadCarrierExpressManager.java
View file @
4b851896
package
com
.
mints
.
goodmoney
.
manager
;
package
com
.
mints
.
goodmoney
.
ad
.
express
;
import
android.content.Context
;
import
android.os.Handler
;
import
android.os.HandlerThread
;
import
android.os.Message
;
import
android.widget.FrameLayout
;
import
android.widget.Toast
;
import
androidx.annotation.NonNull
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.
utils.ToastUtil
;
import
com.mints.goodmoney.
manager.TTNativeExpressManager
;
public
class
TTPreLoadCarrierExpressManager
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/
manager
/TTPreLoadExpressManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/
ad/express
/TTPreLoadExpressManager.java
View file @
4b851896
package
com
.
mints
.
goodmoney
.
manager
;
package
com
.
mints
.
goodmoney
.
ad
.
express
;
import
android.content.Context
;
import
android.widget.FrameLayout
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
public
class
TTPreLoadExpressManager
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/express/TTPreLoadExpressXmlyManager.java
0 → 100644
View file @
4b851896
package
com
.
mints
.
goodmoney
.
ad
.
express
;
import
android.content.Context
;
import
android.widget.FrameLayout
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.utils.LogUtil
;
/**
* 喜马拉雅信息流
*/
public
class
TTPreLoadExpressXmlyManager
{
private
static
TTPreLoadExpressXmlyManager
_inst
;
private
FrameLayout
ttFrameLayout
;
private
TTNativeExpressManager
ttNativeExpressManager
;
public
static
TTPreLoadExpressXmlyManager
getInstance
()
{
if
(
_inst
==
null
)
{
_inst
=
new
TTPreLoadExpressXmlyManager
();
}
return
_inst
;
}
private
TTPreLoadExpressXmlyManager
()
{
// init();
}
private
void
init
()
{
ttNativeExpressManager
=
new
TTNativeExpressManager
();
ttNativeExpressManager
.
initTTAd
(
false
);
}
public
void
onDestroy
()
{
ttNativeExpressManager
.
onTTAdDestroy
();
ttNativeExpressManager
=
null
;
AppConfig
.
xmlyAdFlag
=
false
;
}
public
FrameLayout
getTtFrameLayout
()
{
return
ttFrameLayout
;
}
/**
* 预加载 信息流
*/
public
void
loadTtFrameLayout
()
{
if
(
AppConfig
.
xmlyAdFlag
)
{
return
;
}
init
();
Context
context
=
MintsApplication
.
getContext
();
ttFrameLayout
=
null
;
try
{
ttFrameLayout
=
new
FrameLayout
(
context
);
ttNativeExpressManager
.
getNativeExpressInit
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_XMLY
,
ttFrameLayout
,
360
,
0
);
ttNativeExpressManager
.
setTTNativeExpressManagerListener
(
view
->
{
if
(
view
==
null
)
{
ttFrameLayout
=
null
;
AppConfig
.
xmlyAdFlag
=
false
;
LogUtil
.
d
(
"TTPreLoadExpressXmlyManager"
,
AppConfig
.
xmlyAdFlag
+
""
);
}
else
{
try
{
ttFrameLayout
=
view
;
AppConfig
.
xmlyAdFlag
=
true
;
LogUtil
.
d
(
"TTPreLoadExpressXmlyManager"
,
AppConfig
.
xmlyAdFlag
+
""
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
ttFrameLayout
=
null
;
AppConfig
.
xmlyAdFlag
=
false
;
LogUtil
.
d
(
"TTPreLoadExpressXmlyManager"
,
AppConfig
.
xmlyAdFlag
+
""
);
}
}
});
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/express/YlhPreLoadExpressManager.java
0 → 100644
View file @
4b851896
package
com
.
mints
.
goodmoney
.
ad
.
express
;
import
android.content.Context
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.FrameLayout
;
import
android.widget.Toast
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.qq.e.ads.cfg.VideoOption
;
import
com.qq.e.ads.nativ.ADSize
;
import
com.qq.e.ads.nativ.NativeExpressAD
;
import
com.qq.e.ads.nativ.NativeExpressADView
;
import
com.qq.e.comm.constants.AdPatternType
;
import
com.qq.e.comm.util.AdError
;
import
java.util.List
;
/**
* 优量汇信息流
*/
public
class
YlhPreLoadExpressManager
implements
NativeExpressAD
.
NativeExpressADListener
{
private
static
YlhPreLoadExpressManager
_inst
;
private
NativeExpressAD
nativeExpressAD
;
private
NativeExpressADView
nativeExpressADView
;
public
static
YlhPreLoadExpressManager
getInstance
()
{
if
(
_inst
==
null
)
{
_inst
=
new
YlhPreLoadExpressManager
();
}
return
_inst
;
}
private
YlhPreLoadExpressManager
()
{
init
();
}
private
void
init
()
{
}
public
void
onDestroy
()
{
// 使用完了每一个NativeExpressADView之后都要释放掉资源
if
(
nativeExpressADView
!=
null
)
{
nativeExpressADView
.
destroy
();
}
}
private
void
refreshAd
()
{
try
{
nativeExpressAD
=
new
NativeExpressAD
(
MintsApplication
.
getContext
(),
getMyADSize
(),
YlhAdManager
.
INSTANCE
.
YLH_AD_APPID
,
YlhAdManager
.
INSTANCE
.
getYLH_AD_NATIVEEXPRESS_AWARD
(),
this
);
// 这里的Context必须为Activity
nativeExpressAD
.
loadAD
(
1
);
}
catch
(
NumberFormatException
e
)
{
LogUtil
.
d
(
"YlhPreLoadExpressManager"
,
"ad size invalid."
);
}
}
private
ADSize
getMyADSize
()
{
int
w
=
ADSize
.
FULL_WIDTH
;
int
h
=
ADSize
.
AUTO_HEIGHT
;
return
new
ADSize
(
w
,
h
);
}
@Override
public
void
onADClicked
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onADCloseOverlay
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onADClosed
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onADExposure
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onADLeftApplication
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onADLoaded
(
List
<
NativeExpressADView
>
adList
)
{
// 释放前一个展示的NativeExpressADView的资源
if
(
nativeExpressADView
!=
null
)
{
nativeExpressADView
.
destroy
();
}
nativeExpressADView
=
adList
.
get
(
0
);
// 广告可见才会产生曝光,否则将无法产生收益。
// container.addView(nativeExpressADView);
nativeExpressADView
.
render
();
}
@Override
public
void
onADOpenOverlay
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onRenderFail
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onRenderSuccess
(
NativeExpressADView
nativeExpressADView
)
{
}
@Override
public
void
onNoAD
(
AdError
adError
)
{
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
4b851896
...
...
@@ -43,6 +43,11 @@ public class AppConfig {
*/
public
static
boolean
flVideoFlag
=
false
;
/**
* 喜马拉雅信息流
*/
public
static
boolean
xmlyAdFlag
=
false
;
/**
* app应用首页 0-主页 1-大转盘 2-邀请好友 3-我
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
4b851896
...
...
@@ -33,6 +33,7 @@ public class TtCsjAdManager {
public
static
String
TT_AD_VEDIO_GAME
=
"945562067"
;
// 猎豹
public
static
String
TT_AD_VEDIO_JULEYUN
=
"945675529"
;
// 聚乐云
/*信息流*/
public
static
String
TT_AD_NATIVEEXPRESS_XMLY
=
"945700753"
;
//喜马拉雅信息流
public
static
String
TT_AD_NATIVEEXPRESS_AWARD
=
"945562047"
;
//信息流弹窗
public
static
String
TT_AD_NATIVEEXPRESS_WALK
=
"945562480"
;
//走路
public
static
String
TT_AD_NATIVEEXPRESS_WATER
=
"945562698"
;
//喝水
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
View file @
4b851896
...
...
@@ -31,6 +31,7 @@ object YlhAdManager {
/*信息流*/
var
YLH_AD_NATIVEEXPRESS_JULEYUN
=
"8041941770890627"
//聚乐云
var
YLH_AD_NATIVEEXPRESS_AWARD
=
"2071245901560587"
//奖励弹窗
/* 插屏 */
var
YLH_AD_INTERSTITIALAD_LIEBAO
=
"1021648750986824"
//猎豹
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
4b851896
...
...
@@ -9,7 +9,7 @@ import com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo.Companion.instance
import
com.mints.goodmoney.
manager
.TTPreLoadExpressManager
import
com.mints.goodmoney.
ad.express
.TTPreLoadExpressManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.VedioAdingBean
import
com.mints.goodmoney.mvp.presenters.AwardPresenter
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/FoodSubsidyActivity.kt
View file @
4b851896
...
...
@@ -4,7 +4,7 @@ import android.os.Bundle
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.
manager
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.
ad.express
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.MealBean
import
com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
4b851896
...
...
@@ -13,7 +13,7 @@ import com.mints.goodmoney.R
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.
manager
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.
ad.express
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.ZhangyueManager
import
com.mints.goodmoney.mvp.views.MainView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
4b851896
...
...
@@ -6,7 +6,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.
manager
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.
ad.express
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.MorningClockBean
import
com.mints.goodmoney.mvp.model.VedioAdingBean
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
View file @
4b851896
...
...
@@ -4,7 +4,7 @@ import android.os.Bundle
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.
manager
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.
ad.express
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.WalkBean
import
com.mints.goodmoney.mvp.presenters.WalkPresenter
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
View file @
4b851896
...
...
@@ -4,7 +4,7 @@ import android.os.Bundle
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.
manager
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.
ad.express
.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.WaterBean
import
com.mints.goodmoney.mvp.presenters.WaterPresenter
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/XmlyActivity.kt
View file @
4b851896
...
...
@@ -59,8 +59,8 @@ class XmlyActivity : BaseActivity(), View.OnClickListener {
// 如果不想使用sdk内部搞好的notification,或者想自建notification 可以使用下面的 init()函数进行初始化
mPlayerManager
.
init
(
System
.
currentTimeMillis
().
toInt
(),
mNotification
)
mPlayerManager
.
addPlayerStatusListener
(
mPlayerStatusListener
)
mPlayerManager
.
addAdsStatusListener
(
mAdsListener
)
//
mPlayerManager.addPlayerStatusListener(mPlayerStatusListener)
//
mPlayerManager.addAdsStatusListener(mAdsListener)
mPlayerManager
.
addOnConnectedListerner
(
object
:
XmPlayerManager
.
IConnectListener
{
override
fun
onConnected
()
{
mPlayerManager
.
removeOnConnectedListerner
(
this
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/XmlyAwardActivity.kt
0 → 100644
View file @
4b851896
package
com.mints.goodmoney.ui.activitys
import
android.view.KeyEvent
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import
kotlinx.android.synthetic.main.activity_award_xmly.*
/**
* 描述:奖励界面
* 作者:孟崔广
*/
class
XmlyAwardActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
mTimer
:
CountDownTimerSupport
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award_xmly
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
true
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
SCALE
override
fun
initViewsAndEvents
()
{
ivAwardBack
.
setOnClickListener
(
this
)
initExpress
()
startTime
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
AppConfig
.
xmlyAdFlag
=
false
mTimer
?.
stop
()
mTimer
=
null
try
{
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
}
catch
(
e
:
java
.
lang
.
Exception
)
{
e
.
printStackTrace
()
}
TTPreLoadExpressXmlyManager
.
getInstance
().
onDestroy
()
flAwardXmlyAd
?.
removeAllViews
()
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
true
}
else
super
.
onKeyDown
(
keyCode
,
event
)
}
override
fun
onClick
(
v
:
View
)
{
when
(
v
.
id
)
{
R
.
id
.
ivAwardBack
->
{
finish
()
}
}
}
/**
* 弹窗倒计时
*/
private
fun
startTime
()
{
mTimer
=
CountDownTimerSupport
(
3000L
,
1000L
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
if
(!
this
@XmlyAwardActivity
.
isFinishing
)
{
tvAwardBack
?.
setText
(
"${millisUntilFinished / 1000}"
)
}
}
override
fun
onFinish
()
{
if
(!
this
@XmlyAwardActivity
.
isFinishing
)
{
ivAwardBack
?.
setVisibility
(
View
.
VISIBLE
)
tvAwardBack
?.
setVisibility
(
View
.
GONE
)
}
}
})
mTimer
?.
start
()
}
private
fun
initExpress
()
{
try
{
if
(
flAwardXmlyAd
!=
null
)
{
flAwardXmlyAd
.
removeAllViews
()
flAwardXmlyAd
.
addView
(
TTPreLoadExpressXmlyManager
.
getInstance
().
ttFrameLayout
)
}
}
catch
(
e
:
Exception
)
{
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/LiebaoGameFragment.kt
View file @
4b851896
...
...
@@ -21,7 +21,7 @@ import kotlinx.android.synthetic.main.activity_liebao_game.*
import
java.util.*
/**
* 描述:
邀请好友
* 描述:
猎豹
* 作者:孟崔广
* 时间:2020/11/25 17:30
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
4b851896
...
...
@@ -14,6 +14,8 @@ import com.daimajia.androidanimations.library.YoYo
import
com.daimajia.androidanimations.library.YoYo.YoYoString
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.TTPreLoadExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
...
...
@@ -90,6 +92,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 奖励页预加载 信息流广告
TTPreLoadExpressManager
.
getInstance
().
loadTtFrameLayout
()
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
// 首次显示权限弹窗
showPowerDialog
()
// 初始化视频
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
4b851896
...
...
@@ -15,10 +15,11 @@ import com.fly.scenemodule.SceneUtil
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.presenters.MyPresenter
...
...
@@ -34,7 +35,6 @@ import com.mints.goodmoney.ui.widgets.ShareDialog
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.QQJumpUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.goodmoney.utils.Utils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.GlideUtils
...
...
@@ -130,6 +130,9 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 防止banner刷新太快
if
(
AntiShake
.
check
(
fl_my_banner
?.
id
))
return
BannerManager
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
fl_my_banner
)
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
}
}
...
...
@@ -656,6 +659,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
Constant
.
HOT_ACTIVITY_LIEBAO
->
{
readyGo
(
LiebaoGameActivity
::
class
.
java
)
// readyGo(XmlyActivity::class.java)
// readyGo(XmlyAwardActivity::class.java)
}
Constant
.
HOT_ACTIVITY_MORNINGCLOCK
->
{
TTPreLoadCarrierExpressManager
.
getInstance
().
loadTtFrameLayout
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
)
...
...
GoodMoney/app/src/main/jniLibs/arm64-v8a/libxmediaplayer_x.so
0 → 100644
View file @
4b851896
File added
GoodMoney/app/src/main/jniLibs/armeabi-v7a/libxmediaplayer.so
0 → 100644
View file @
4b851896
File added
GoodMoney/app/src/main/jniLibs/armeabi-v7a/libxmediaplayerv7.so
0 → 100644
View file @
4b851896
File added
GoodMoney/app/src/main/jniLibs/armeabi/libxmediaplayer.so
View file @
4b851896
No preview for this file type
GoodMoney/app/src/main/jniLibs/armeabi/libxmediaplayer_x.so
deleted
100644 → 0
View file @
bd0b9144
GoodMoney/app/src/main/jniLibs/armeabi/libxmediaplayerv7.so
View file @
4b851896
No preview for this file type
GoodMoney/app/src/main/res/layout/activity_award_xmly.xml
0 → 100644
View file @
4b851896
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:background=
"@color/black"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"10dp"
>
<TextView
android:id=
"@+id/tvAwardBack"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_alignParentRight=
"true"
android:background=
"@drawable/shape_back"
android:gravity=
"center"
android:text=
"3"
android:textColor=
"#9F9F9F"
android:textSize=
"16sp"
/>
<ImageView
android:id=
"@+id/ivAwardBack"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_alignParentRight=
"true"
android:src=
"@mipmap/ic_drink_cancel"
android:visibility=
"gone"
/>
</RelativeLayout>
<FrameLayout
android:id=
"@+id/flAwardXmlyAd"
android:layout_width=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_height=
"wrap_content"
>
</FrameLayout>
</RelativeLayout>
\ No newline at end of file
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