Commit a5f84795 authored by mengcuiguang2's avatar mengcuiguang2

优化网络层,添加umeng

parent 4c363f84
......@@ -162,8 +162,6 @@ dependencies {
// 应用管理中心分包
implementation(name: 'humesdk-1.0.0', ext: 'aar')
// 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:asms:1.2.3'// 必选
implementation 'com.umeng.umsdk:apm:1.4.0'
......@@ -181,7 +179,6 @@ dependencies {
//RxPay
implementation 'com.cuieney:rxpay-api:2.2.3'
kapt 'com.cuieney:rxpay-compiler:2.1.1'
implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation(name: 'BaiduLBS_AndroidSDK_Lib', ext: 'aar')
......
......@@ -20,12 +20,12 @@
<!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限)-->
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name="com.mints.street.AppApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_main_enable"
android:icon="@mipmap/ic_launcher_main"
android:label="@string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
......@@ -66,13 +66,19 @@
android:process=":remote"/>
<activity android:name="com.mints.street.splash.SplashActivity"
android:screenOrientation="portrait"
android:theme="@style/NormalSplash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data android:scheme="um.60e80209a6f90557b7b19aa7"/>
<category android:name="android.intent.category.LAUNCHER" />
</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 android:name="com.mints.street.login.LoginActivity">
......
......@@ -28,14 +28,14 @@ class AppApplication : BaseApp() {
builder.detectFileUriExposure()
// 解决java.util.concurrent.TimeoutException https://www.jianshu.com/p/844ef9c84f15
val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
Thread.setDefaultUncaughtExceptionHandler { t, e ->
if (t.name == "FinalizerWatchdogDaemon" && e is TimeoutException) {
Log.e("ignore", "ignore")
} else {
defaultUncaughtExceptionHandler?.uncaughtException(t, e)
}
}
// val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
// Thread.setDefaultUncaughtExceptionHandler { t, e ->
// if (t.name == "FinalizerWatchdogDaemon" && e is TimeoutException) {
// Log.e("ignore", "ignore")
// } else {
// defaultUncaughtExceptionHandler?.uncaughtException(t, e)
// }
// }
}
/*
......
......@@ -2,7 +2,7 @@ package com.mints.street.api
import com.mints.street.bean.AwardBean
import com.mints.street.bean.UserBean
import com.mints.street.netwrok.HttpManager
import com.mints.street.netwrok.common.HttpManager
import io.reactivex.Observable
import me.goldze.mvvmhabit.http.BaseResponse
import retrofit2.Response
......
package com.mints.street.login
import android.app.Application
import com.fry.base.basenetwork.HttpSubscribeImpl
import com.mints.street.bean.AwardBean
import com.mints.street.model.ApiModel
import com.mints.street.netwrok.base.HttpSubscribeImpl
import me.goldze.mvvmhabit.base.BaseViewModel
import me.goldze.mvvmhabit.http.BaseResponse
import me.goldze.mvvmhabit.utils.KLog
......
......@@ -20,7 +20,7 @@ import com.mints.street.main.my.MyFragment
import com.mints.street.main.vr.VRFragment
import com.mints.street.manager.UmengManager
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.utils.ToastUtils
......@@ -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
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
when (keyCode) {
......
......@@ -3,7 +3,7 @@ package com.mints.street.model
import com.mints.street.api.MainApi
import com.mints.street.bean.AwardBean
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 io.reactivex.Observable
import me.goldze.mvvmhabit.http.BaseResponse
......
package com.fry.base.basenetwork;
package com.mints.street.netwrok.base;
import java.util.ArrayList;
import java.util.List;
......
package com.fry.base.basenetwork
package com.mints.street.netwrok.base
import me.goldze.mvvmhabit._enum.ViewStatus
import me.goldze.mvvmhabit.base.BaseViewModel
......
package com.fry.base.basenetwork;
package com.mints.street.netwrok.base;
import io.reactivex.disposables.Disposable;
import me.goldze.mvvmhabit.http.BaseResponse;
......
package com.fry.base.basenetwork
package com.mints.street.netwrok.base
import io.reactivex.Observer
import io.reactivex.disposables.Disposable
......
package com.fry.base.basenetwork;
package com.mints.street.netwrok.base;
import android.content.Context;
import android.text.TextUtils;
......@@ -6,6 +6,7 @@ import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.fry.base.BuildConfig;
import com.mints.street.netwrok.common.GsonConverterFactory;
import java.util.concurrent.TimeUnit;
......@@ -15,7 +16,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import me.goldze.mvvmhabit.http.cookie.CookieJarImpl;
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.LoggingInterceptor;
import me.goldze.mvvmhabit.utils.Utils;
......
package com.fry.base.basenetwork;
package com.mints.street.netwrok.common;
import com.google.gson.Gson;
import com.mints.street.manager.UserManager;
import java.io.IOException;
import java.io.OutputStreamWriter;
......@@ -91,7 +92,7 @@ public class GsonConverterFactory extends Converter.Factory {
int code = br.getstatus();
if (code == 401) {
try {
// UserManager.Companion.getINSTANCE().userLogout();
UserManager.Companion.getINSTANCE().userLogout();
// Activity forwardActivity = ForegroundOrBackground.getApp_activity();
// if (forwardActivity != null) {
......
package com.mints.street.netwrok;
package com.mints.street.netwrok.common;
import io.reactivex.Observable;
......
package com.mints.street.netwrok;
package com.mints.street.netwrok.common;
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.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.trello.rxlifecycle2.LifecycleProvider;
......
package com.fry.base.netwrok
package com.mints.street.netwrok.common
import android.text.TextUtils
import android.util.Log
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment