Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
LuckyFarm
Commits
f43a4edd
Commit
f43a4edd
authored
Oct 23, 2020
by
wangxuewei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_luckyfarm_1.0.1' into develop_luckyfarm_1.0.1
parents
5649d494
332c9fb7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
133 deletions
+135
-133
BaseApplication.kt
app/src/main/java/com/ym/game/application/BaseApplication.kt
+2
-2
SplashPresenter.kt
library/src/main/java/com/ym/library/net/SplashPresenter.kt
+133
-131
No files found.
app/src/main/java/com/ym/game/application/BaseApplication.kt
View file @
f43a4edd
...
@@ -30,8 +30,8 @@ class BaseApplication : MultiDexApplication() {
...
@@ -30,8 +30,8 @@ class BaseApplication : MultiDexApplication() {
super
.
onCreate
()
super
.
onCreate
()
//第一步初始化 application
//第一步初始化 application
AppliContext
.
init
(
this
)
AppliContext
.
init
(
this
)
Config
.
init
(
this
)
//
Config.init(this)
NetConfig
.
setBase_Url
(
NetConfig
.
Environment
.
PRODUCT
)
// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
NetConfig
.
setBase_Url
(
NetConfig
.
Environment
.
DEV
)
// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
Constant
.
appLs
=
"a03d5320d905cf3b"
//appls
Constant
.
appLs
=
"a03d5320d905cf3b"
//appls
AdManager
.
init
(
//TODO 替换id
AdManager
.
init
(
//TODO 替换id
...
...
library/src/main/java/com/ym/library/net/SplashPresenter.kt
View file @
f43a4edd
...
@@ -6,6 +6,7 @@ import android.text.TextUtils
...
@@ -6,6 +6,7 @@ import android.text.TextUtils
import
android.util.Log
import
android.util.Log
import
com.ayl.ces.jni.CesCore
import
com.ayl.ces.jni.CesCore
import
com.ym.library.AppliContext
import
com.ym.library.AppliContext
import
com.ym.library.Config
import
com.ym.library.Constant
import
com.ym.library.Constant
import
com.ym.library.utils.*
import
com.ym.library.utils.*
import
io.reactivex.Observable
import
io.reactivex.Observable
...
@@ -48,7 +49,8 @@ class SplashPresenter : SplashContract.Presenter {
...
@@ -48,7 +49,8 @@ class SplashPresenter : SplashContract.Presenter {
val
flag
=
Utils
.
needPermissions
(*
PERMISSIONS
)
val
flag
=
Utils
.
needPermissions
(*
PERMISSIONS
)
e
?.
onNext
(
flag
)
e
?.
onNext
(
flag
)
e
?.
onComplete
()
e
?.
onComplete
()
}).
subscribeOn
(
Schedulers
.
io
()).
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
object
:
Observer
<
Boolean
>
{
}).
subscribeOn
(
Schedulers
.
io
()).
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
object
:
Observer
<
Boolean
>
{
override
fun
onSubscribe
(
d
:
Disposable
)
{
override
fun
onSubscribe
(
d
:
Disposable
)
{
mDisposablePermissions
=
d
mDisposablePermissions
=
d
}
}
...
@@ -116,7 +118,7 @@ class SplashPresenter : SplashContract.Presenter {
...
@@ -116,7 +118,7 @@ class SplashPresenter : SplashContract.Presenter {
private
fun
initConfig
(
mNovelInitEntity
:
NovelInitEntity
)
{
private
fun
initConfig
(
mNovelInitEntity
:
NovelInitEntity
)
{
EventUtils
.
onEvent
(
"SplashPresenter_initConfig"
)
EventUtils
.
onEvent
(
"SplashPresenter_initConfig"
)
Config
.
init
(
mActivity
)
NetConfig
.
Other
.
HELP_AND_FEEDBACK_URL
=
mNovelInitEntity
?.
help
NetConfig
.
Other
.
HELP_AND_FEEDBACK_URL
=
mNovelInitEntity
?.
help
NetConfig
.
Other
.
PRIVACY_PROTOCOL_URL
=
mNovelInitEntity
?.
agreement
NetConfig
.
Other
.
PRIVACY_PROTOCOL_URL
=
mNovelInitEntity
?.
agreement
NetConfig
.
Other
.
FENLEI_URL
=
mNovelInitEntity
?.
cate
NetConfig
.
Other
.
FENLEI_URL
=
mNovelInitEntity
?.
cate
...
@@ -144,7 +146,7 @@ class SplashPresenter : SplashContract.Presenter {
...
@@ -144,7 +146,7 @@ class SplashPresenter : SplashContract.Presenter {
Constant
.
SdkKey
.
kdxf_app_id
=
mNovelInitEntity
.
global_config
?.
ad_sdk_cfg
?.
kdxf
?.
app_id
Constant
.
SdkKey
.
kdxf_app_id
=
mNovelInitEntity
.
global_config
?.
ad_sdk_cfg
?.
kdxf
?.
app_id
Constant
.
PLAY_URL
=
mNovelInitEntity
.
h5_url
?.
PlayUrl
Constant
.
PLAY_URL
=
mNovelInitEntity
.
h5_url
?.
PlayUrl
Constant
.
ISENTERTAINMENT
=
mNovelInitEntity
.
switch
?.
isEntertainment
?:
1
Constant
.
ISENTERTAINMENT
=
mNovelInitEntity
.
switch
?.
isEntertainment
?:
1
Constant
.
qq
=
mNovelInitEntity
?.
switch
?.
qq
?:
0
Constant
.
qq
=
mNovelInitEntity
?.
switch
?.
qq
?:
0
//广点通广告配置信息
//广点通广告配置信息
val
gdtStr
=
Utils
.
obj2Str
(
mNovelInitEntity
.
global_config
?.
ad_sdk_cfg
?.
gdt
)
val
gdtStr
=
Utils
.
obj2Str
(
mNovelInitEntity
.
global_config
?.
ad_sdk_cfg
?.
gdt
)
...
...
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