[master] reset loc

This commit is contained in:
zhongchao
2024-11-18 17:42:00 +08:00
parent ac00066378
commit fa6a3f00fe
4 changed files with 36 additions and 39 deletions

View File

@@ -54,32 +54,27 @@ public class UploadDataService extends Service {
private final Runnable buildLocationTask = new Runnable() {
@Override
public void run() {
Log.d("BuildLocationTask", "Starting buildLocationTask execution");
try {
final LocationServiceProvider provider = LocationDelegateManager.getInstance().getLocationServiceProvider();
if (provider != null) {
final Location location = new Location();
location.setAccuracy(provider.getAccuracy());
location.setAdCode(provider.getAdCode());
location.setAltitude(provider.getAltitude());
location.setBearing(provider.getBearing());
location.setCarStatus(provider.getCarStatus());
location.setCityCode(provider.getCityCode());
location.setCityName(provider.getCityName());
location.setGpsAccuracyStatus(provider.getGpsAccuracyStatus());
location.setLatitude(provider.getLatitude());
location.setLongitude(provider.getLongitude());
location.setLocType(provider.getLocType());
location.setProvider(provider.getProvider());
location.setSatellites(provider.getSatellites());
location.setSpeed(provider.getSpeed());
location.setTime(provider.getTime());
buildCoordinates(location);
}
handler.postDelayed(this, LocUploadConfig.instance().getLocInterval());
}catch (Exception e){
e.printStackTrace();
final LocationServiceProvider provider = LocationDelegateManager.getInstance().getLocationServiceProvider();
if (provider != null) {
final Location location = new Location();
location.setAccuracy(provider.getAccuracy());
location.setAdCode(provider.getAdCode());
location.setAltitude(provider.getAltitude());
location.setBearing(provider.getBearing());
location.setCarStatus(provider.getCarStatus());
location.setCityCode(provider.getCityCode());
location.setCityName(provider.getCityName());
location.setGpsAccuracyStatus(provider.getGpsAccuracyStatus());
location.setLatitude(provider.getLatitude());
location.setLongitude(provider.getLongitude());
location.setLocType(provider.getLocType());
location.setProvider(provider.getProvider());
location.setSatellites(provider.getSatellites());
location.setSpeed(provider.getSpeed());
location.setTime(provider.getTime());
buildCoordinates(location);
}
handler.postDelayed(this, LocUploadConfig.instance().getLocInterval());
}
};
@@ -96,7 +91,7 @@ public class UploadDataService extends Service {
HandlerThread mHandlerThread = new HandlerThread("upload_data_thread");
mHandlerThread.start();
handler = new Handler(mHandlerThread.getLooper());
handler.postDelayed(buildLocationTask, 3000L);
handler.post(buildLocationTask);
handler.postDelayed(uploadTask, 5 * LocUploadConfig.instance().getLocInterval());
}

View File

@@ -33,30 +33,30 @@ SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
USERNAME=xintai
PASSWORD=xintai2018
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
RELEASE=false
RELEASE=true
# AI CLOUD 云平台
# 工具类
MOGO_UTILS_VERSION=1.4.7.47
MOGO_UTILS_VERSION=1.4.7.50
# 网络请求
MOGO_NETWORK_VERSION=1.4.7.47
MOGO_NETWORK_VERSION=1.4.7.50
# 鉴权
MOGO_PASSPORT_VERSION=1.4.7.47
MOGO_PASSPORT_VERSION=1.4.7.50
# 常链接
MOGO_SOCKET_VERSION=1.4.7.47
MOGO_SOCKET_VERSION=1.4.7.50
# 数据采集
MOGO_REALTIME_VERSION=1.4.7.47
MOGO_REALTIME_VERSION=1.4.7.50
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.4.7.47
MOGO_TANLU_VERSION=1.4.7.50
# 直播推流
MOGO_LIVE_VERSION=1.4.7.47
MOGO_LIVE_VERSION=1.4.7.50
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.4.7.47
MOGO_TRAFFICLIVE_VERSION=1.4.7.50
# 定位服务
MOGO_LOCATION_VERSION=1.4.7.47
MOGO_LOCATION_VERSION=1.4.7.50
# 远程通讯模块
MOGO_TELEMATIC_VERSION=1.4.7.47
MOGO_TELEMATIC_VERSION=1.4.7.50
# v2x
MOGO_V2X_VERSION=1.4.7.47
MOGO_V2X_VERSION=1.4.7.50
# SKIN
MOGO_SKIN_VERSION=1.4.7.49.19
# SDK
@@ -75,7 +75,7 @@ SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=false
# 组织名
GROUP=com.mogo.cloud
VERSION_NAME=1.4.7.47
VERSION_NAME=1.4.7.50
# 主页
POM_URL=https://gitlab.zhidaoauto.com/SCA/L4HA/AndroidApp/support/countly-sdk-android
# 版本控制信息

View File

@@ -0,0 +1,2 @@
Manifest-Version: 1.0