[base_3.4.0-map-sdk]

This commit is contained in:
zhongchao
2023-08-18 18:42:12 +08:00
parent 10b5933c03
commit fc25630dc4
43 changed files with 644 additions and 790 deletions

View File

@@ -101,7 +101,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
}
private fun initGDLoc() {
CallerMapUIServiceManager.getGDLocationServer(context!!)?.start()
CallerMapUIServiceManager.getGDLocationServer()?.start(context!!)
}
private fun preparePassportEnvironment() {
@@ -170,10 +170,10 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
// 更新
httpDnsSimpleLocation = if (
mogoLocation.cityCode.isNullOrEmpty() &&
!CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode.isNullOrEmpty()
!CallerMapUIServiceManager.getGDLocationServer()?.lastCityCode.isNullOrEmpty()
) {
SimpleLocation(
CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode
CallerMapUIServiceManager.getGDLocationServer()?.lastCityCode
?: "010",
mogoLocation.latitude,
mogoLocation.longitude
@@ -354,13 +354,9 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
})
// 开启Socket长链服务
val lat =
if (location.latitude != 0.0) location.latitude else CallerMapUIServiceManager.getGDLocationServer(
context!!
)!!.lastLat
if (location.latitude != 0.0) location.latitude else CallerMapUIServiceManager.getGDLocationServer()!!.lastLat
val lon =
if (location.longitude != 0.0) location.longitude else CallerMapUIServiceManager.getGDLocationServer(
context!!
)!!.lastLon
if (location.longitude != 0.0) location.longitude else CallerMapUIServiceManager.getGDLocationServer()!!.lastLon
MogoAiCloudSocketManager.getInstance(context)
.init(context, sn, DebugConfig.getSocketAppId(), lat, lon)
}
@@ -381,11 +377,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
map["lat"] =
if (CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().latitude != 0.0)
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().latitude else
CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLat
CallerMapUIServiceManager.getGDLocationServer()!!.lastLat
map["lon"] =
if (CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().longitude != 0.0)
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().longitude else
CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLon
CallerMapUIServiceManager.getGDLocationServer()!!.lastLon
map["reason"] = msg
return GsonUtils.toJson(map)
}