Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_freeworld
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_freeworld
Commits
a5f84795
Commit
a5f84795
authored
Jul 12, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化网络层,添加umeng
parent
4c363f84
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
51 additions
and
34 deletions
+51
-34
build.gradle
app/build.gradle
+0
-3
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+10
-4
AppApplication.kt
app/src/main/java/com/mints/street/AppApplication.kt
+8
-8
MainApi.kt
app/src/main/java/com/mints/street/api/MainApi.kt
+1
-1
LoginViewModel.kt
app/src/main/java/com/mints/street/login/LoginViewModel.kt
+1
-1
MainActivity.kt
app/src/main/java/com/mints/street/main/MainActivity.kt
+15
-1
ApiModel.kt
app/src/main/java/com/mints/street/model/ApiModel.kt
+1
-1
HttpConfiguation.java
.../java/com/mints/street/netwrok/base/HttpConfiguation.java
+1
-1
HttpSubscribeImpl.kt
...n/java/com/mints/street/netwrok/base/HttpSubscribeImpl.kt
+1
-1
IHttpResponseListener.java
.../com/mints/street/netwrok/base/IHttpResponseListener.java
+1
-1
IHttpSubscribe.kt
...main/java/com/mints/street/netwrok/base/IHttpSubscribe.kt
+1
-1
RetrofitClient.java
...in/java/com/mints/street/netwrok/base/RetrofitClient.java
+2
-2
GsonConverterFactory.java
...com/mints/street/netwrok/common/GsonConverterFactory.java
+3
-2
HttpErrorProcess.java
...ava/com/mints/street/netwrok/common/HttpErrorProcess.java
+1
-1
HttpManager.java
...ain/java/com/mints/street/netwrok/common/HttpManager.java
+4
-5
OkHttpInterceptor.kt
...java/com/mints/street/netwrok/common/OkHttpInterceptor.kt
+1
-1
libCtaApiLib.so
app/src/main/jniLibs/arm64-v8a/libCtaApiLib.so
+0
-0
libumeng-spy.so
app/src/main/jniLibs/arm64-v8a/libumeng-spy.so
+0
-0
libCtaApiLib.so
app/src/main/jniLibs/armeabi-v7a/libCtaApiLib.so
+0
-0
libumeng-spy.so
app/src/main/jniLibs/armeabi-v7a/libumeng-spy.so
+0
-0
libCtaApiLib.so
app/src/main/jniLibs/armeabi/libCtaApiLib.so
+0
-0
libumeng-spy.so
app/src/main/jniLibs/armeabi/libumeng-spy.so
+0
-0
ic_launcher_main.png
app/src/main/res/mipmap-xhdpi/ic_launcher_main.png
+0
-0
ic_launcher_main.png
app/src/main/res/mipmap-xxhdpi/ic_launcher_main.png
+0
-0
No files found.
app/build.gradle
View file @
a5f84795
...
@@ -162,8 +162,6 @@ dependencies {
...
@@ -162,8 +162,6 @@ dependencies {
// 应用管理中心分包
// 应用管理中心分包
implementation
(
name:
'humesdk-1.0.0'
,
ext:
'aar'
)
implementation
(
name:
'humesdk-1.0.0'
,
ext:
'aar'
)
// umeng
// umeng
// implementation(name: 'umeng-asms-armeabi-v1.2.2', ext: 'aar')
// implementation(name: 'umeng-apm-armeabi-v1.2.0', ext: 'aar')
implementation
'com.umeng.umsdk:common:9.4.0'
// 必选
implementation
'com.umeng.umsdk:common:9.4.0'
// 必选
implementation
'com.umeng.umsdk:asms:1.2.3'
// 必选
implementation
'com.umeng.umsdk:asms:1.2.3'
// 必选
implementation
'com.umeng.umsdk:apm:1.4.0'
implementation
'com.umeng.umsdk:apm:1.4.0'
...
@@ -181,7 +179,6 @@ dependencies {
...
@@ -181,7 +179,6 @@ dependencies {
//RxPay
//RxPay
implementation
'com.cuieney:rxpay-api:2.2.3'
implementation
'com.cuieney:rxpay-api:2.2.3'
kapt
'com.cuieney:rxpay-compiler:2.1.1'
kapt
'com.cuieney:rxpay-compiler:2.1.1'
implementation
'com.romandanylyk:pageindicatorview:1.0.3'
implementation
(
name:
'BaiduLBS_AndroidSDK_Lib'
,
ext:
'aar'
)
implementation
(
name:
'BaiduLBS_AndroidSDK_Lib'
,
ext:
'aar'
)
...
...
app/src/main/AndroidManifest.xml
View file @
a5f84795
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
<!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限)-->
<!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限)-->
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<application
<application
android:name=
"com.mints.street.AppApplication"
android:name=
"com.mints.street.AppApplication"
android:allowBackup=
"true"
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_
main_enable
"
android:icon=
"@mipmap/ic_
launcher_main
"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:largeHeap=
"true"
android:networkSecurityConfig=
"@xml/network_security_config"
android:networkSecurityConfig=
"@xml/network_security_config"
android:requestLegacyExternalStorage=
"true"
android:requestLegacyExternalStorage=
"true"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
...
@@ -66,13 +66,19 @@
...
@@ -66,13 +66,19 @@
android:process=
":remote"
/>
android:process=
":remote"
/>
<activity
android:name=
"com.mints.street.splash.SplashActivity"
<activity
android:name=
"com.mints.street.splash.SplashActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
>
android:theme=
"@style/NormalSplash"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<data
android:scheme=
"um.60e80209a6f90557b7b19aa7"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.BROWSABLE"
/>
<data
android:scheme=
"um.60e80209a6f90557b7b19aa7"
/>
</intent-filter>
</activity>
</activity>
<activity
android:name=
"com.mints.street.login.LoginActivity"
>
<activity
android:name=
"com.mints.street.login.LoginActivity"
>
...
...
app/src/main/java/com/mints/street/AppApplication.kt
View file @
a5f84795
...
@@ -28,14 +28,14 @@ class AppApplication : BaseApp() {
...
@@ -28,14 +28,14 @@ class AppApplication : BaseApp() {
builder
.
detectFileUriExposure
()
builder
.
detectFileUriExposure
()
// 解决java.util.concurrent.TimeoutException https://www.jianshu.com/p/844ef9c84f15
// 解决java.util.concurrent.TimeoutException https://www.jianshu.com/p/844ef9c84f15
val
defaultUncaughtExceptionHandler
=
Thread
.
getDefaultUncaughtExceptionHandler
()
//
val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
Thread
.
setDefaultUncaughtExceptionHandler
{
t
,
e
->
//
Thread.setDefaultUncaughtExceptionHandler { t, e ->
if
(
t
.
name
==
"FinalizerWatchdogDaemon"
&&
e
is
TimeoutException
)
{
//
if (t.name == "FinalizerWatchdogDaemon" && e is TimeoutException) {
Log
.
e
(
"ignore"
,
"ignore"
)
//
Log.e("ignore", "ignore")
}
else
{
//
} else {
defaultUncaughtExceptionHandler
?.
uncaughtException
(
t
,
e
)
//
defaultUncaughtExceptionHandler?.uncaughtException(t, e)
}
//
}
}
//
}
}
}
/*
/*
...
...
app/src/main/java/com/mints/street/api/MainApi.kt
View file @
a5f84795
...
@@ -2,7 +2,7 @@ package com.mints.street.api
...
@@ -2,7 +2,7 @@ package com.mints.street.api
import
com.mints.street.bean.AwardBean
import
com.mints.street.bean.AwardBean
import
com.mints.street.bean.UserBean
import
com.mints.street.bean.UserBean
import
com.mints.street.netwrok.HttpManager
import
com.mints.street.netwrok.
common.
HttpManager
import
io.reactivex.Observable
import
io.reactivex.Observable
import
me.goldze.mvvmhabit.http.BaseResponse
import
me.goldze.mvvmhabit.http.BaseResponse
import
retrofit2.Response
import
retrofit2.Response
...
...
app/src/main/java/com/mints/street/login/LoginViewModel.kt
View file @
a5f84795
package
com.mints.street.login
package
com.mints.street.login
import
android.app.Application
import
android.app.Application
import
com.fry.base.basenetwork.HttpSubscribeImpl
import
com.mints.street.bean.AwardBean
import
com.mints.street.bean.AwardBean
import
com.mints.street.model.ApiModel
import
com.mints.street.model.ApiModel
import
com.mints.street.netwrok.base.HttpSubscribeImpl
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.http.BaseResponse
import
me.goldze.mvvmhabit.http.BaseResponse
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.KLog
...
...
app/src/main/java/com/mints/street/main/MainActivity.kt
View file @
a5f84795
...
@@ -20,7 +20,7 @@ import com.mints.street.main.my.MyFragment
...
@@ -20,7 +20,7 @@ import com.mints.street.main.my.MyFragment
import
com.mints.street.main.vr.VRFragment
import
com.mints.street.main.vr.VRFragment
import
com.mints.street.manager.UmengManager
import
com.mints.street.manager.UmengManager
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.tbruyelle.rxpermissions2.RxPermissions
import
kotlinx.android.synthetic.main.layout_popupwindow.*
import
com.umeng.analytics.MobclickAgent
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.ToastUtils
import
me.goldze.mvvmhabit.utils.ToastUtils
...
@@ -69,6 +69,20 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
...
@@ -69,6 +69,20 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
}
}
override
fun
onResume
()
{
super
.
onResume
()
// 友盟
MobclickAgent
.
onResume
(
this
)
}
override
fun
onPause
()
{
super
.
onPause
()
// 友盟
MobclickAgent
.
onPause
(
this
)
}
var
oldTime
:
Long
=
0
var
oldTime
:
Long
=
0
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
when
(
keyCode
)
{
when
(
keyCode
)
{
...
...
app/src/main/java/com/mints/street/model/ApiModel.kt
View file @
a5f84795
...
@@ -3,7 +3,7 @@ package com.mints.street.model
...
@@ -3,7 +3,7 @@ package com.mints.street.model
import
com.mints.street.api.MainApi
import
com.mints.street.api.MainApi
import
com.mints.street.bean.AwardBean
import
com.mints.street.bean.AwardBean
import
com.mints.street.bean.UserBean
import
com.mints.street.bean.UserBean
import
com.mints.street.netwrok.HttpManager
import
com.mints.street.netwrok.
common.
HttpManager
import
com.trello.rxlifecycle2.LifecycleProvider
import
com.trello.rxlifecycle2.LifecycleProvider
import
io.reactivex.Observable
import
io.reactivex.Observable
import
me.goldze.mvvmhabit.http.BaseResponse
import
me.goldze.mvvmhabit.http.BaseResponse
...
...
library_base/src/main/java/com/fry/base/basenetwork
/HttpConfiguation.java
→
app/src/main/java/com/mints/street/netwrok/base
/HttpConfiguation.java
View file @
a5f84795
package
com
.
fry
.
base
.
basenetwork
;
package
com
.
mints
.
street
.
netwrok
.
base
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
...
library_base/src/main/java/com/fry/base/basenetwork
/HttpSubscribeImpl.kt
→
app/src/main/java/com/mints/street/netwrok/base
/HttpSubscribeImpl.kt
View file @
a5f84795
package
com.
fry.base.basenetwork
package
com.
mints.street.netwrok.base
import
me.goldze.mvvmhabit._enum.ViewStatus
import
me.goldze.mvvmhabit._enum.ViewStatus
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.base.BaseViewModel
...
...
library_base/src/main/java/com/fry/base/basenetwork
/IHttpResponseListener.java
→
app/src/main/java/com/mints/street/netwrok/base
/IHttpResponseListener.java
View file @
a5f84795
package
com
.
fry
.
base
.
basenetwork
;
package
com
.
mints
.
street
.
netwrok
.
base
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.disposables.Disposable
;
import
me.goldze.mvvmhabit.http.BaseResponse
;
import
me.goldze.mvvmhabit.http.BaseResponse
;
...
...
library_base/src/main/java/com/fry/base/basenetwork
/IHttpSubscribe.kt
→
app/src/main/java/com/mints/street/netwrok/base
/IHttpSubscribe.kt
View file @
a5f84795
package
com.
fry.base.basenetwork
package
com.
mints.street.netwrok.base
import
io.reactivex.Observer
import
io.reactivex.Observer
import
io.reactivex.disposables.Disposable
import
io.reactivex.disposables.Disposable
...
...
library_base/src/main/java/com/fry/base/basenetwork
/RetrofitClient.java
→
app/src/main/java/com/mints/street/netwrok/base
/RetrofitClient.java
View file @
a5f84795
package
com
.
fry
.
base
.
basenetwork
;
package
com
.
mints
.
street
.
netwrok
.
base
;
import
android.content.Context
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
...
@@ -6,6 +6,7 @@ import android.text.TextUtils;
...
@@ -6,6 +6,7 @@ import android.text.TextUtils;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
com.fry.base.BuildConfig
;
import
com.fry.base.BuildConfig
;
import
com.mints.street.netwrok.common.GsonConverterFactory
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -15,7 +16,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
...
@@ -15,7 +16,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import
io.reactivex.schedulers.Schedulers
;
import
io.reactivex.schedulers.Schedulers
;
import
me.goldze.mvvmhabit.http.cookie.CookieJarImpl
;
import
me.goldze.mvvmhabit.http.cookie.CookieJarImpl
;
import
me.goldze.mvvmhabit.http.cookie.store.PersistentCookieStore
;
import
me.goldze.mvvmhabit.http.cookie.store.PersistentCookieStore
;
import
me.goldze.mvvmhabit.http.interceptor.BaseInterceptor
;
import
me.goldze.mvvmhabit.http.interceptor.logging.Level
;
import
me.goldze.mvvmhabit.http.interceptor.logging.Level
;
import
me.goldze.mvvmhabit.http.interceptor.logging.LoggingInterceptor
;
import
me.goldze.mvvmhabit.http.interceptor.logging.LoggingInterceptor
;
import
me.goldze.mvvmhabit.utils.Utils
;
import
me.goldze.mvvmhabit.utils.Utils
;
...
...
library_base/src/main/java/com/fry/base/basenetwork
/GsonConverterFactory.java
→
app/src/main/java/com/mints/street/netwrok/common
/GsonConverterFactory.java
View file @
a5f84795
package
com
.
fry
.
base
.
basenetwork
;
package
com
.
mints
.
street
.
netwrok
.
common
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.mints.street.manager.UserManager
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.OutputStreamWriter
;
import
java.io.OutputStreamWriter
;
...
@@ -91,7 +92,7 @@ public class GsonConverterFactory extends Converter.Factory {
...
@@ -91,7 +92,7 @@ public class GsonConverterFactory extends Converter.Factory {
int
code
=
br
.
getstatus
();
int
code
=
br
.
getstatus
();
if
(
code
==
401
)
{
if
(
code
==
401
)
{
try
{
try
{
//
UserManager.Companion.getINSTANCE().userLogout();
UserManager
.
Companion
.
getINSTANCE
().
userLogout
();
// Activity forwardActivity = ForegroundOrBackground.getApp_activity();
// Activity forwardActivity = ForegroundOrBackground.getApp_activity();
// if (forwardActivity != null) {
// if (forwardActivity != null) {
...
...
app/src/main/java/com/mints/street/netwrok/HttpErrorProcess.java
→
app/src/main/java/com/mints/street/netwrok/
common/
HttpErrorProcess.java
View file @
a5f84795
package
com
.
mints
.
street
.
netwrok
;
package
com
.
mints
.
street
.
netwrok
.
common
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
...
...
app/src/main/java/com/mints/street/netwrok/HttpManager.java
→
app/src/main/java/com/mints/street/netwrok/
common/
HttpManager.java
View file @
a5f84795
package
com
.
mints
.
street
.
netwrok
;
package
com
.
mints
.
street
.
netwrok
.
common
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
com.fry.base.basenetwork.HttpConfiguation
;
import
com.fry.base.basenetwork.IHttpResponseListener
;
import
com.fry.base.basenetwork.RetrofitClient
;
import
com.fry.base.global.Constants
;
import
com.fry.base.global.Constants
;
import
com.fry.base.netwrok.OkHttpInterceptor
;
import
com.mints.street.netwrok.base.HttpConfiguation
;
import
com.mints.street.netwrok.base.IHttpResponseListener
;
import
com.mints.street.netwrok.base.RetrofitClient
;
import
com.mints.street.utils.encry.AESUtils
;
import
com.mints.street.utils.encry.AESUtils
;
import
com.trello.rxlifecycle2.LifecycleProvider
;
import
com.trello.rxlifecycle2.LifecycleProvider
;
...
...
app/src/main/java/com/mints/street/netwrok/OkHttpInterceptor.kt
→
app/src/main/java/com/mints/street/netwrok/
common/
OkHttpInterceptor.kt
100755 → 100644
View file @
a5f84795
package
com.
fry.base.netwrok
package
com.
mints.street.netwrok.common
import
android.text.TextUtils
import
android.text.TextUtils
import
android.util.Log
import
android.util.Log
...
...
app/src/main/jniLibs/arm64-v8a/libCtaApiLib.so
0 → 100644
View file @
a5f84795
File added
app/src/main/jniLibs/arm64-v8a/libumeng-spy.so
0 → 100644
View file @
a5f84795
File added
app/src/main/jniLibs/armeabi-v7a/libCtaApiLib.so
0 → 100644
View file @
a5f84795
File added
app/src/main/jniLibs/armeabi-v7a/libumeng-spy.so
0 → 100644
View file @
a5f84795
File added
app/src/main/jniLibs/armeabi/libCtaApiLib.so
0 → 100644
View file @
a5f84795
File added
app/src/main/jniLibs/armeabi/libumeng-spy.so
0 → 100644
View file @
a5f84795
File added
app/src/main/res/mipmap-xhdpi/ic_launcher_main.png
View replaced file @
4c363f84
View file @
a5f84795
7.72 KB
|
W:
|
H:
14 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/mipmap-xxhdpi/ic_launcher_main.png
View replaced file @
4c363f84
View file @
a5f84795
7.72 KB
|
W:
|
H:
23.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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