[Upload]
迁移mogo-module-map代码MoGoEagleEye.core.function-impl.mogo-core-function-map Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -70,7 +70,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogoservice
|
||||
api rootProject.ext.dependencies.moduleshare
|
||||
api rootProject.ext.dependencies.moduleextensions
|
||||
api rootProject.ext.dependencies.modulemap
|
||||
api rootProject.ext.dependencies.moduleADAS
|
||||
api rootProject.ext.dependencies.callchat
|
||||
api rootProject.ext.dependencies.callchatprovider
|
||||
@@ -100,7 +99,6 @@ dependencies {
|
||||
api project(':modules:mogo-module-service')
|
||||
api project(':modules:mogo-module-share')
|
||||
api project(':modules:mogo-module-extensions')
|
||||
api project(':modules:mogo-module-map')
|
||||
api project(':modules:mogo-module-adas')
|
||||
api project(':modules:mogo-module-carchatting')
|
||||
api project(':modules:mogo-module-carchattingprovider')
|
||||
|
||||
@@ -60,6 +60,9 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_api
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
|
||||
implementation rootProject.ext.dependencies.mogomap
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
} else {
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':services:mogo-service-api')
|
||||
@@ -68,6 +71,9 @@ dependencies {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-api')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
|
||||
implementation project(":libraries:mogo-map")
|
||||
implementation project(":libraries:mogo-map-api")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.map;
|
||||
package com.mogo.eagle.core.function.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.map;
|
||||
package com.mogo.eagle.core.function.map;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.map;
|
||||
package com.mogo.eagle.core.function.map;
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.map;
|
||||
package com.mogo.eagle.core.function.map;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-core-function-map</string>
|
||||
</resources>
|
||||
@@ -30,7 +30,6 @@
|
||||
:modules:mogo-module-service
|
||||
:core:function-impl:mogo-core-function-check
|
||||
:services:mogo-service
|
||||
:modules:mogo-module-map
|
||||
:core:function-impl:mogo-core-function-smp
|
||||
:modules:mogo-module-share
|
||||
:modules:mogo-module-extensions
|
||||
|
||||
1
modules/mogo-module-map/.gitignore
vendored
1
modules/mogo-module-map/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,8 +0,0 @@
|
||||
# 地图模块
|
||||
|
||||
## 地图 Fragment
|
||||
|
||||
## 地图状态和小智交互部分
|
||||
|
||||
## 语音控制地图
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'kotlin-kapt'
|
||||
id 'com.alibaba.arouter'
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode Integer.valueOf(VERSION_CODE)
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
|
||||
//ARouter apt 参数
|
||||
kapt {
|
||||
useBuildCache = false
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
}
|
||||
|
||||
}
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogomap
|
||||
api rootProject.ext.dependencies.mogomapapi
|
||||
api rootProject.ext.dependencies.mogo_core_utils
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
api rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
} else {
|
||||
api project(":libraries:mogo-map")
|
||||
api project(":libraries:mogo-map-api")
|
||||
api project(':core:mogo-core-utils')
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-data')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1 +0,0 @@
|
||||
#-----ModuleMap-----
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-map
|
||||
VERSION_CODE=1
|
||||
24
modules/mogo-module-map/proguard-rules.pro
vendored
24
modules/mogo-module-map/proguard-rules.pro
vendored
@@ -1,24 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----ModuleMap-----
|
||||
-keep class com.mogo.module.map.NavConstants
|
||||
@@ -1,2 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.module.map" />
|
||||
@@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-map</string>
|
||||
</resources>
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.mogo.module.service.dispatch.bean;
|
||||
|
||||
public class StartLatLon {
|
||||
|
||||
private double lat;
|
||||
private double lon;
|
||||
|
||||
public StartLatLon(double lat, double lon) {
|
||||
this.lat = lat;
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StartLatLon{" +
|
||||
"lat=" + lat +
|
||||
", lon=" + lon +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -48,12 +48,6 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
private var mCityCode: String = ""
|
||||
|
||||
|
||||
private var getVideoFailed: (() -> Unit)? = null
|
||||
|
||||
fun getVideoFailed(getVideoFailed: (() -> Unit)) {
|
||||
this.getVideoFailed = getVideoFailed
|
||||
}
|
||||
|
||||
fun initCarCorderController() {
|
||||
try {
|
||||
zdCarCoderController =
|
||||
@@ -140,17 +134,6 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
} else { //比亚迪
|
||||
Logger.d(TANLU, "takeVideo ------ isnet = " + NetworkUtils.isConnected(AbsMogoApplication.getApp().applicationContext))
|
||||
getInfo("", mAddress, mLongitude, mLatitude, mType, mDirection, mAreaCode, mCityCode, 1, mFromType, CarCorderController.mainInfoId)?.let { uploadRoadInfo(it) }
|
||||
|
||||
//地图上打点
|
||||
taskAsync(3_000) {
|
||||
try {
|
||||
// LatLngStickyEventBus.getInstance()
|
||||
// .postSticky(GetImageSuccessEvent("", mType))
|
||||
} catch (e: java.lang.Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,9 +149,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
//获取图片失败也上报,图片不打点
|
||||
if (isCustom) {
|
||||
getInfo("", mAddress, mLongitude, mLatitude, mType, mDirection, mAreaCode, mCityCode, 0, mFromType, mainInfoId)?.let { uploadRoadInfo(it) }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//拍照成功回调返回图片本地路径
|
||||
|
||||
@@ -12,15 +12,13 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.elegant.analytics.Analytics
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.share.BuildConfig
|
||||
import com.mogo.module.share.bean.event.GetImageSuccessEvent
|
||||
import com.mogo.module.share.bean.event.LatLngStickyEventBus
|
||||
import com.zhidao.cosupload.manager.CosUploadManagerImpl
|
||||
import com.mogo.module.share.BuildConfig
|
||||
import com.mogo.module.share.constant.*
|
||||
import com.mogo.module.share.constant.ShareConstants.TANLU
|
||||
import com.mogo.module.share.utils.*
|
||||
@@ -28,6 +26,8 @@ import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.clearStrateg
|
||||
import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.getStrategyFrequency
|
||||
import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.getStrategyInterval
|
||||
import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.getStrategyType
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.zhidao.cosupload.manager.CosUploadManagerImpl
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
@@ -56,6 +56,7 @@ class MainService : Service() {
|
||||
|
||||
//是否已经获取过策略
|
||||
var isGetStrategies: Boolean = false
|
||||
|
||||
//1是一次性,2是周期性
|
||||
private var picType: Int = 0
|
||||
private var videoType: Int = 0
|
||||
@@ -167,7 +168,6 @@ class MainService : Service() {
|
||||
CarCorderController.initCarCorderController()
|
||||
mainServiceHttpModel = MainServiceController()
|
||||
registReceiver()
|
||||
// CosCallbackMapController.init(this)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,14 +252,12 @@ class MainService : Service() {
|
||||
private fun takePhoto(isInterval: Boolean = false, isCustom: Boolean = false) {
|
||||
Logger.d(TANLU, "takePhoto -----1----->")
|
||||
//判断是否授权
|
||||
// if (isAuthorization(BaseApplication.getAppContext())) {
|
||||
//目前不支持连拍,只能定时2秒拍一张 第一期每次只拍一张
|
||||
Observable.intervalRange(0, 1, 0, 2_000, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe {
|
||||
CarCorderController.takePhoto(1, 1, false, isCustom, TANLU_ROAD_CURRENT, mainInfoId, fromType, mLongitude, mLatitude, speed, mAddress, mDirection, mAreaCode, mCityCode)
|
||||
}
|
||||
// }
|
||||
|
||||
postPhotoAlarmTask(isInterval)
|
||||
|
||||
@@ -274,9 +272,7 @@ class MainService : Service() {
|
||||
id: Long = 0
|
||||
) {
|
||||
Logger.d(TANLU, "takeVideo --------1----> fromType = $fromType --isCustom = $isCustom")
|
||||
// if (isAuthorization(BaseApplication.getAppContext())) {
|
||||
CarCorderController.takeVideo(1, duration, isCustom, id, shareType, mainInfoId, fromType, mLongitude, mLatitude, speed, mAddress, mDirection, mAreaCode, mCityCode)
|
||||
// }
|
||||
postVideoAlarmTask(isInterval)
|
||||
|
||||
this@MainService.isCustom = isCustom
|
||||
@@ -304,8 +300,7 @@ class MainService : Service() {
|
||||
AbsMogoApplication.getApp().applicationContext,
|
||||
"pic",
|
||||
getStrategyType("pic")
|
||||
)
|
||||
, pendingIntent
|
||||
), pendingIntent
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -336,8 +331,7 @@ class MainService : Service() {
|
||||
AbsMogoApplication.getApp().applicationContext,
|
||||
"video",
|
||||
getStrategyType("video")
|
||||
)
|
||||
, videoPendingIntent
|
||||
), videoPendingIntent
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -345,9 +339,7 @@ class MainService : Service() {
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
unregisterReceiver(mAlarmBroadCast)
|
||||
// unregisterReceiver(mCustomSendBroadCast)
|
||||
CarCorderController.release()
|
||||
// CosCallbackMapController.release()
|
||||
LatLngStickyEventBus.getInstance().unregister(this)
|
||||
LatLngStickyEventBus.getInstance().removeAllStickyEvents()
|
||||
trackNormalEvent(CarNet_MainService_Destory, null)
|
||||
|
||||
@@ -57,7 +57,6 @@ include ':libraries:mogo-map'
|
||||
|
||||
// OLD业务模块
|
||||
include ':modules:mogo-module-adas'
|
||||
include ':modules:mogo-module-map'
|
||||
include ':modules:mogo-module-common'
|
||||
include ':modules:mogo-module-main'
|
||||
include ':modules:mogo-module-share'
|
||||
|
||||
Reference in New Issue
Block a user